Categories
Git Programming Languages

How to get Git Commit Id

If you are a programmer or developer then you must heard about the Git.
Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

You must If you are working with Git and you want to make changes in the code. Then after making those changes you will need a commit id to make those changes Live.

Please follow the following procedure to get a Git commit id.

cd /c/xampp/xampp/htdocs/lazy-load-release/
git checkout master    (to go to master branch)
git pull origin master (this will copy all the data from git to your computer)
git branch NewBranch (this will create a new branch with data of master branch)
git checkout NewBranch (To switch to your branch and then Put your files or work in lazy-load-release(name of folder may be differ) folder)
git status (you will see the list fo files that just been changed)
git commit filename1 filename1 -m “author_commit”
git push origin NewBranch (if you are in the same branch NewBranch) or git push origin NewBranch:NewBranch (if you are not in the same branch)
git log (copy the commit id)