what is VCS?
- It allows developers to work simultaneously.
- It does not allow overwriting each other’s changes.
- It maintains a history of every version.
Distributed Version Control System
Why Git?
- You can use git even when you're offline.
- Create branches, work locally, isolate your work and merge seamlessly.
- Code revisions (commit) that you made would be available to only you locally unless you push to remote repo.
Differnce between Git and Github
Installing git on Linux
- For Fedora users:
$ sudo yum install git-all
For Debian users:
$ sudo apt-get install git-all
Obtain repo
git init
git clone "url"
Create branch
git branch {branch name}
Switching to other branch
git checkout {branch name}
Make changes
Stage changes
git add {filename}
Commit changes
git commit -m “Commit message”
Merging
git merge origin/master
Push changes to remote area
git push {remote_name} {repo_name}
Git help
- $ git help <verb>
- $ git <verb> --help
- $ man git-<verb>
GIT Basics
Contributors
Rishabh Singh / @stalwart201