Git directory Installation
git init: This sets up the git environment. Go to a directory you want git installed. You only do this once.
git config –global user.name “YOUR_USERNAME”: Add your name here, source
git config –global user.email “your_email_address@example.com”: Add email here
Commonly used Commands
git status: The most commonly used command. It will tell you the files that have changed but not added, added files, and recommend you do a commit
git branch: Shows you all your branches
git branch
git checkout
Git Document Workflow
Getting and Updating your Project
git clone: Initially you will need to do a git clone to get your project, but you only need to do this once, unless you delete your project.
git pull origin master: After your initial clone, use this to update your project from the server.
Overall Workflow
- git branch
: You make a branch of your work. This is a copy. You make changes to the copy and not the master. This way the changes can be undone in an orderly manner. - Edit your documents.
- git add
/ : Add these files to your staging area. You can add the whole directory, just ensure you have an ending “/” - git commit -m “Some Comment”: Commit all changes to files in the staging area. The comment will remind you of the changes, which you will see when received by the server
- git push origin
: Push your branch’s staging area up to the server - On the server, do a merge request, followed by the approval for the merge
Other commands:
git reset
git rm ‘*.txt’: removes files
git merge
git branch -d
git push origin
When git runs it sends you emails, so you know it has completed.
https://www.google.com/url?q=https%3A%2F%2Fwww.quora.com%2FIs-Github-used-with-coders-in-China-India-If-not-what-are-the-Github-equivalents&sa=D&sntz=1&usg=AFQjCNHv6tKqqCS7xPcDs7ky3ANBcBW3NA

Actually, it is not Git that sends you email when it is done, that is Gitlab CI running. Git by itself is a command line tool. Gitlab adds a web interface and Continuous Integration.