Example Git session - First steps using Git » History » Version 1
Redmine Admin, 02/23/2016 12:22 PM
1 | 1 | Redmine Admin | h1. Example Git session - First steps using Git |
---|---|---|---|
2 | |||
3 | Here's an example on using Git. The very first steps in using Git. Please note that you need to adapt the Git repository URL! |
||
4 | |||
5 | |||
6 | In order to use the itisdb git repository you need to follow the steps described here. |
||
7 | https://scm.in.tu-clausthal.de/projects/redmine-git-svn-help/wiki/Resolve_SSL_certificate_error_with_Git |
||
8 | |||
9 | Download the certificate chains |
||
10 | <pre> |
||
11 | wget "https://pki.pca.dfn.de/tu-clausthal-ca/pub/cacert/chain.txt" |
||
12 | --2016-02-23 11:35:35-- https://pki.pca.dfn.de/tu-clausthal-ca/pub/cacert/chain.txt |
||
13 | Resolving pki.pca.dfn.de (pki.pca.dfn.de)... |
||
14 | Connecting to pki.pca.dfn.de (pki.pca.dfn.de):443... connected. |
||
15 | HTTP request sent, awaiting response... 200 OK |
||
16 | Length: 5330 (5.2K) [text/plain] |
||
17 | Saving to: 'chain.txt' |
||
18 | |||
19 | chain.txt 100%[======================================================>] 5.21K --.-KB/s in 0s |
||
20 | |||
21 | 2016-02-23 11:35:35 (49.0 MB/s) - 'chain.txt' saved [5330/5330] |
||
22 | </pre> |
||
23 | |||
24 | <pre> |
||
25 | wget "http://curl.haxx.se/ca/cacert.pem" |
||
26 | --2016-02-23 11:35:51-- http://curl.haxx.se/ca/cacert.pem |
||
27 | Resolving curl.haxx.se (curl.haxx.se)... |
||
28 | Connecting to curl.haxx.se (curl.haxx.se):80... connected. |
||
29 | HTTP request sent, awaiting response... 301 Moved Permanently |
||
30 | Location: https://curl.haxx.se/ca/cacert.pem [following] |
||
31 | --2016-02-23 11:35:51-- https://curl.haxx.se/ca/cacert.pem |
||
32 | Connecting to curl.haxx.se (curl.haxx.se):443... connected. |
||
33 | HTTP request sent, awaiting response... 200 OK |
||
34 | Length: 252451 (247K) |
||
35 | Saving to: 'cacert.pem' |
||
36 | |||
37 | cacert.pem 100%[======================================================>] 246.53K 1.54MB/s in 0.2s |
||
38 | |||
39 | 2016-02-23 11:35:52 (1.54 MB/s) - 'cacert.pem' saved [252451/252451] |
||
40 | </pre> |
||
41 | |||
42 | Append the TU-Clausthal-DFN chain to curls cacerts |
||
43 | <pre> |
||
44 | cat cacert.pem chain.txt > TUC-DFN-chain.pem |
||
45 | </pre> |
||
46 | |||
47 | Create (or edit) a new file in your homedirectory called '.gitconfig' |
||
48 | |||
49 | |||
50 | |||
51 | Now that git knows the TU-Clausthal-DFN certificate chain you need to clone the itisdb repository on before you can add own files or chagesets. |
||
52 | <pre> |
||
53 | git clone https://scm.in.tu-clausthal.de/git/itisdb |
||
54 | </pre> |
||
55 | |||
56 | Change into the <itisdb> directory to use the following commands. |
||
57 | |||
58 | Now that you've cloned your working copy you can add files or changes to your local repository (just copy the new files into the freshly cloned itisdb directroy). |
||
59 | Tell the itisdb repository that you've added/changed something with these commands |
||
60 | For single files or directories you changed use |
||
61 | <pre> |
||
62 | git add <filename> |
||
63 | </pre> |
||
64 | |||
65 | To add all files/changes you made use |
||
66 | <pre> |
||
67 | git add * |
||
68 | </pre> |
||
69 | |||
70 | |||
71 | Now commit your changes to the HEAD of your local repository |
||
72 | <pre> |
||
73 | git commit -m "Commit-Message" |
||
74 | </pre> |
||
75 | |||
76 | Finally push everything into the itisdb repository with |
||
77 | <pre> |
||
78 | git push origin master |
||
79 | </pre> |
||
80 | |||
81 | Please update your local repository before start working on it with |
||
82 | <pre> |
||
83 | git pull |
||
84 | </pre> |
||
85 | |||
86 | |||
87 | For further documentation use these links: |
||
88 | http://gitref.org/ |
||
89 | http://git-scm.com/docs |