Git commands - Magesan

Git commands

Git commands

Git is an essential storage for storing large amount of projects.

Following are the important commands for git

Git command for adding or pushing changes to git

git add .
git commit -m "Your comment (What You Were Worked On)"
git push origin branch_name

When downloading latest changes from git branch

git pull origin branchName

When git don’t allow and warned you to avoid or stash you changes

git stash

When cloning a whole project to your local system.

git clone --single-branch -b branchName https://github.com/User/Project.git

Leave a Reply

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

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>