- Git is a distributed version control system and source code management system.
- All people who are involved in a software development team/process.
- Distributed model
- This means your work is your own. You can let others see only what is necessary.
- Not everything has to be public.
- Very fast.
- Branching and merging are easy
- It feels like a natural part of the workflow.
- They are cheap so you can branch whenever you want.
- Data integrity is assured
- Because git uses SHA1 trees, data corruption due to external reasons can be easily detected.
- Steep learning curve: Many commands with many options.
- Commands are non-intuitive.
- Binary files are a big no (If your project has non-text files that are updated frequently).
Repository: It is a local storage of software packages which can be recovered and installed on a computer.
Remote When your artefacts are directly on the Git Server.
Branch It is the term we use for a variaton from the production/master/final(trunk) code.
Master It is the term we use for where your final/production/stable code must be.
Fork It is the term we use when we want to take the source code from a program and to develop a entirely new program.
Checkout When we want to download the repository with its current status.
Clone When we want to fetch the repository from the remote git server.
Log Is the term we use to extract the history of commits of the current prject.
Add/Stage When we use for stage files into the staging process of the Git before the commit.
Commit When we add the latest changes to the source code to the repository.
Push When we want to transfer the last commit(s) to a remote server.
Fetch When we update our local code according to the code on the remoter server.
Pull When we update our local code according to the code on the remoter server followed by the merge of these both code.
Pull Request Is a method of submitting contributions to an open development project.
Merge When we want to combine two pieces of code into one.
Diff: When we want to see the differences between two codes right before merging it.
Deploy: Is the term we use when we want to release our application to its production phase.
git config --global http.proxy
git config --global http.proxy "http://proxy:8080"
git config --global --unset http.proxy
git checkout -b <branch>
git add <fileName or *>
git commit -am "msg"
git push
git push -u origin {the_remote_branch}
git branch -d {the_remote_branch}
git push origin --delete {the_remote_branch}
git remote add upstream <UrlMainRepoLinkSSH>
git fetch upstream
git pull upstream master
git branch --set-upstream my_branch origin/my_branch