Count your git commits locally
Ever wondered how many commits you have made in your repository? Of course you can always upload to github and see the commits but why upload when you can see it locally. This is...
A @tutorialhorizon website.
Ever wondered how many commits you have made in your repository? Of course you can always upload to github and see the commits but why upload when you can see it locally. This is...
When you collaborate with a lot of people, you might want to see the list of commits made by a certain person. And here’s how you would do that git log –author=authorName
If you want to quickly see a list of all your branches and the last commit message on each of those branches, simply use the following commands Only local branches git branch -v Only...
Often when you create a new branch, you want to swtich to it immeditately. The usual way to do that is git branch new-branch-name git checkout new-branch-name You can save yourself some keystrokes and...
Its not always possible to come up with that perfect branch name at first attempt. Git lets you easily rename a local branch by issuing the following command. git branch -m old-branch-name new-branch-name
Git lets you see the commit messages in several ways using the git log command but sometimes that is not enough. To see a simple one line listing with the last few digits of...
It may happen that your working directory has a mixture of new files and old files that you updated. If you want to issue a git add but ignore the new files momentarily, maybe...
If for some reason you pushed your branch upstream but want to change the name of that branch, you can easily accomplish this by a simple set of git commands. However keep in mind...
Once you have merged the changes of your local branch into the master, you might want to delete it if you dont plan to do any further work on that branch. To do that....