Tutorials

Git HowTo

Git Access

To get access to a git repository, you need to create one for example on github.

Git Usage

Supposed the url of the repository is named “repo”, then you can check out a local copy of the repository with the following command on the unix terminal:

git clone repo

This is called the check-out line. Usually you find that line supplied on the web page of the repository provider.

Now your can develop code by modifying that local copy.

For example, you can add a file to the local copy:

git add ‘ ’ ‘filenameĂ„Ă„Ă„

To commit all local modifications as a new check in:

git commit -a -m “commit log”

This commit is one additional step in the version history of your repository. It shows up with the commit log as a comment.

And to finally transmit all committed check-ins to the repo on the server:

git push

There’s also the other way round: To transmit all commited check-ins from the server that others have committed to your local copy:

git pull

This may require a merge operation, if the versions have conflicts. So be sure that you do not modify parts others are working on unless you really know what you are doing!

Happy coding!

Options: