Example Git session - First steps using Git » History » Revision 2
Revision 1 (Redmine Admin, 02/23/2016 12:22 PM) → Revision 2/3 (Redmine Admin, 02/23/2016 02:00 PM)
h1. Example Git session - First steps using Git h2. 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! In this example the repository is called "itisdb". h2. NOTE: Steps 1-4 needs to be done only once. In order to use the itisdb git repository you need to follow the steps described here. https://scm.in.tu-clausthal.de/projects/redmine-git-svn-help/wiki/Resolve_SSL_certificate_error_with_Git # <cd> into your homedirectory # Download the certificate chains <pre> *wget "https://pki.pca.dfn.de/tu-clausthal-ca/pub/cacert/chain.txt"* wget "https://pki.pca.dfn.de/tu-clausthal-ca/pub/cacert/chain.txt" --2016-02-23 11:35:35-- https://pki.pca.dfn.de/tu-clausthal-ca/pub/cacert/chain.txt Resolving pki.pca.dfn.de (pki.pca.dfn.de)... Connecting to pki.pca.dfn.de (pki.pca.dfn.de):443... connected. HTTP request sent, awaiting response... 200 OK Length: 5330 (5.2K) [text/plain] Saving to: 'chain.txt' chain.txt 100%[======================================================>] 5.21K --.-KB/s in 0s 2016-02-23 11:35:35 (49.0 MB/s) - 'chain.txt' saved [5330/5330] </pre> <pre> wget "http://curl.haxx.se/ca/cacert.pem" --2016-02-23 11:35:51-- http://curl.haxx.se/ca/cacert.pem Resolving curl.haxx.se (curl.haxx.se)... Connecting to curl.haxx.se (curl.haxx.se):80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://curl.haxx.se/ca/cacert.pem [following] --2016-02-23 11:35:51-- https://curl.haxx.se/ca/cacert.pem Connecting to curl.haxx.se (curl.haxx.se):443... connected. HTTP request sent, awaiting response... 200 OK Length: 252451 (247K) Saving to: 'cacert.pem' cacert.pem 100%[======================================================>] 246.53K 1.54MB/s in 0.2s 2016-02-23 11:35:52 (1.54 MB/s) - 'cacert.pem' saved [252451/252451] </pre> # Append the TU-Clausthal-DFN chain to curls cacerts <pre> cat cacert.pem chain.txt > TUC-DFN-chain.pem </pre> # Create (or edit) a new file in your home directory homedirectory called '.gitconfig' and insert <pre> [http] sslCAInfo = /home/USERNAME/TUC-DFN-chain.pem </pre> # 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. <pre> git clone https://scm.in.tu-clausthal.de/git/itisdb </pre> # Change into the <itisdb> directory to use the following commands. 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). Tell the itisdb repository that you've added/changed something with these commands For single files or directories you changed use <pre> git add <filename> </pre> To add all files/changes you made use <pre> git add * </pre> # Now commit your changes to the HEAD of your local repository <pre> git commit -m "Insert a meaningful commit message right here!" "Commit-Message" </pre> # Finally push everything into the itisdb repository with <pre> git push origin master </pre> # Please update your local repository before start working on it with <pre> git pull </pre> For further documentation use these links: http://gitref.org/ http://git-scm.com/docs