Categories
Git Programming Languages

How to get Git Commit Id

Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do.

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)

By Vaseem Ansari

Hey guys this is Vaseem Ansari, 27 years old, Software & Web Developer, Blogger & works on Wordpress Plugin Themes Development, PHP MySql Programming and Open Sources Technologies.
It takes a while for me to build trust in someone new. I am honest, thoughtful. I'm Glad I'm Me No one looks The way I do. No one walks the way I walk. No one talks the way I talk. I am me. There's no one else I'd rather be! Have fun reading this blog and don't forget to subscribe to the feed to keep updated on the latest articles.

Leave a Reply

Your email address will not be published. Required fields are marked *