-
Notifications
You must be signed in to change notification settings - Fork 7
Git Information
Basic information about Git you can find on this official page. There are also some introduction sources. Further information about interesting sources you can find in the last section.
First you have to install the Git software on your local computer. Basically you just need Git, which you can get here. There is also the option to install additional software like Tortoise Git that provides a graphical user interface. In this introduction we just use the Git command line tool “Git CMD” and no additional graphical ui. If you are interested, you can find a collection of gui software on this site.
After the installation you need to do some configurations of Git. To list the currently used configurations open the Git CMD and use the command:
git config --list
Now it is time to set your username and your email address. This way it is clear which developer did which commit and people can contact you if they have a question or found a mistake. To set the two informations use the commands:
git config --global user.name "YOUR USERNAME"
git config --global user.email "YOUR@USEREMAIL.COM"
In case you work behind a proxy server, as it happens often in companies, you have to add some additional proxy information with the following command:
git config --global http.proxy "https://USERNAME:PASSWORD@PROXYADDRESS"
The information you need is:
- The username for your account
- The passwort for your account
- The IP address or domain of the proxy
If you want the version control to ignore special files of your project, you can do this by adding a special file to your working directory called:
.gitignore
Inside this file you can list a specific file that should be ignored, or you can use wildcards to ignore complete groups of files:
fileIWantToIgnore.txt (ignore exactly this file)
*.c (ignore all files with the ending .c)
You can see the syntax and a list of common commands grouped by usage if you just type:
git
If you need help to use a specific command you can get it with one of these two commands:
git help <COMMAND>
git <COMMAND> --help
A list of available commands you can get with:
git help -a
A list of different available concept guides you can access via:
git help -g
Here are described just two possible workflows for contributing to the original BuildingControlLib. Of course Git can used in more ways than this, i.e. for version control of a project that is stored just on your local machine. Such cases we do not describe here.
In both described ways we expect an existing server sided repository that you want to contribute to, i.e. an existing project on GitHub like the BuildingControlLib.
In this case you search for the URL of the project. In our case this would be "https://github.com/TechnicalBuildingSystems/BuildingControlLib". You can find it on the GitHub page of the project, via the button "Clone or download".
| Command | Result |
|||
| git ||
|git help -a||
|git help -g||
|git help <COMMAND>||
|git <COMMAND> --help||
|git config --list||
|git config --global VARIABLE "DATA"||
||| |||
|``||