Saturday, July 26, 2014

My Daily GIT Command Sequence

As a user of GIT repositories, everyday I'm checking out the source code from the repository, make changes, and finally submit it to the repository again at the end of the day. This has become a part of my daily work routine. Unless I have encountered some new requirement, most of the days these are the sequence of GIT commands which I issue daily.

I start working by moving into the local working copy of a project through the command line and checking out the source code.

git checkout

Then I start working on the source code. I will be adding new files, deleting files and modifying the existing ones. If I implemented something significant, or if the day is over before I finish working on something, its a time to push my modifications into the remote repository. This is the command sequence for ending my daily work on a repository.

git add *

git commit -a

git push origin remote_branch_name

Occasionally, I come across many different requirements such as cloning a new repository, creating new branches, etc which require a different set of commands. However its very rarely. Most of the cases, the above set of commands do the job for me.

No comments:

Post a Comment