Use git log to see the last ‘n’ commit messages
Doing a regular git log shows all the log messages until the terminal buffer is full. Sometimes thats not enough, but other times its just too much. What if you only wanted to see...
A @tutorialhorizon website.
Doing a regular git log shows all the log messages until the terminal buffer is full. Sometimes thats not enough, but other times its just too much. What if you only wanted to see...
So you want to get the name of the git branch that you are on. There are 2 main ways to find that out depending upon what you want to do after you know...
If you have changes in your working directory and you need to switch branches, git will complain when you attempt to checkout a different branch. A this point, you can choose one of three...
If you are already here, you probably know that p4merge is a really amazing tool for visualizing diffs. To set it up with git on an ubuntu system, simply do the following Download p4merge...
What if you want to share only a certain branch with a collaborator without having to share the entire codebase? Zipping is not an effective solution since it does not preserve the commit history....
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