Awesome Assignment to learn Git
It’s been nearly two weeks in the course and the journey so far has been so awesome. With assignments getting started feeling very very excited to learn things So in the Software Development Process course second assignment is to prove our ability for using git which is one of the best version control tool in the world.
I have been using git for past two years after learning it from online and using it effectively in Hackathons. But my usage was very limited compared to the real features it has. This assignment made me to make myself to learn more about git.
The assignment is provided with private repo in Github for the course students alone. For each students a private repository is created. I also came to know about the cheat sheet of git commands from here
The assignment asked to perform a set of activities. It has more steps and activities. At the end we need to confirm if our Network graph from our Github should match with the one they have provided. In case if we have missed any steps obviously the graph would be wrong and we may not score well.
In order to score well I ensured that I practise the steps in few repos multiple time to ensure that I get correct graph. During this course I missed of lot things because I was unaware of the commands. By practising in other repos before submitting my assignment ensured that I learnt a lot of commands which are required for better colloborations among team members when working on Github.
The following are the commands I learnt
git stash-used when there is a dirty local and you want to pull. this command ensures that local repo hides those dirty
git merge- used to merge a another branch to the current branch
git push -u origin all- used to push all branches to the remote
git branch- to know which branch currently we are working
git checkout <branchname>- to checkout a branch i.e to change the current working branch
git checkout -b <branchname> origin/<branchname>- to checkout the branch in remote and create the same branch locally when there are many branches in remote
git pull <branchname>- to pull a branch from remote to the local
git fetch origin- to fetch all the branches from remote to local
- To merge a conflict either modify the changes manually and use
git add <filename>. Later do the commit neccessary
git tag- Lists the tags present in the repository. This is similar to Branches
git tag -a <tag name> -m <message for the tag>- Add a tag to the repository
- Also learnt about Network graph which will show the history of a branch of the repository.
This was really fun in doing this assignment.