After learning out the world of open source in the previous post let’s learn how to use Git which is used by GitHub for contributing to the world of open source.
- Better managing of a team project
- Very easy to use
- Makes it easy to develop for multiple tasks simultaneously
No use of copy pasting of projects/nor emailing this
What is Git? version control system for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for source code management in software development, but it can be used to keep track of changes in any set of files.
Which are the other VCS’s?
CVS (Concurrent Versions System)
Basics of GIT
- Staging area - https://email@example.com
- Commits -
- Branches - https://media.licdn.com/mpr/mpr/AAEAAQAAAAAAAAk3AAAAJDYwNzY5OTA1LTA1YmItNGRlOS1iODQ3LTYzZjRjOGFiZTIzNg.jpg
Basic commands on GIT
- git init
- git status
- [ Make some changes ] git commit -m, -a
- git push
- git merge
git log git log —oneline
New branch: git checkout -b new-branch
What is github?
To list all branches: git remote -v To add: git remote add [URL]
How to create pull requests
- Difference between git pull & git fetch
What to do when you’re stuck or messed up the git setup
- Use git reset
- Use git reflog
Miscellaneous points on GIT
- Theres no download/upload in git instead we push/pull or cloning repo
- Github student pack - https://education.github.com/pack
Quick glance on some advance uses of github/git -
- Continuous integration