WHAT IS GIT
Git is a versioning control system.
The concepts are straightforward, however the terms used may not be. So to ensure we are all on the same page, here is the terms that you are likely to encounter and their meaning
This would be your git repository server.
This is the location where you copied or are working on the data came from or will go to the git remote
Git can manage multiple versions of the data it stores. So with regards to an application development repository, you can have one branch be 1.0, another 1.1, 1.2, 1.3, etc. Typically this would be dev, testing, 1.0, 1.1, 2.0, 2.1, etc. It is standard practice to create a new branch from master (the main branch) to snapshot a certain version.
Any change, addition, or deletion to a file or files that is applied from the local repository to the remote
Retrieval of data from the remote
This is a request of the repository admins to receive new data from you, generally in terms of contributing work to said project. The pull here is in relationship to the server doing the pull.
Sending of local repostiory to the remote.
This is a rarity, but in cases where there is a private server which does not allow anonymous browsing or pulling, a push from the remote to you.
This is the intelligent merging of generally a local repository into the remote's, however strictly speaking its any two repositories histories are synced up, generally a local and the remote's.
The same as a pull request.
WHAT TO CONTROL
Anything really. I personally use it for this site, personal code projects, backing up things ...
To get started you will first need to setup your git account. Then you can clone/push/pull files as need be.
This isn't going to a website necessarily to create and register. This is telling git some basics. Now, on fancier tools such as GitLab or GitHub, you can use your ssh public key for authenticating to your repos. But for less fancy things you will need to setup a email/password combination. Additional options are the editor used for the commit messages, and your diff tool. Some GUI tools can handle reading this in, and modifying them. I use only linux and the terminal for my tasks, so I can't speak for OSX/Windows GUI tools at all, and have only briefly used a few linux ones (GitCola, GitG).
git config --global user.name "John Doe" git config --global user.email firstname.lastname@example.org git config --global core.editor emacs git config --global merge.tool vimdiff git config credential.helper store
Check your settings:
git config --list
This will be the first pull done, presuming you have nothing and need to be current with whatever branch you are going to be working with. Some projects are utilizing multiple branches, others just one.
git clone URL_OF_REPO
As changes are made by those that have modification rights, you will obviously need to grab them. This is a pull.
If you were are someone who is authorized to make changes (commits), have made them, and would like to upload commits to the repo, this is called a push.
git add . git commit -m "Commit comment" git push -u REPO BRANCH # If you are already set to the proper repo/branch you can omit this and just do a "git push"
Example to a GitLab repo:
git push -u origin master
I MUCKED SOMETHING UP AND CANNOT RE-PULL
Presuming you are using origin/master for your repo & branch
git fetch --all git reset --hard origin/master