Tag: commit

Git commit with no commit message

How can I commit changes without specifying commit message? Why is it required by default?

How do we verify commit messages for a push?

Coming from CVS, we have a policy that commit messages should be tagged with a bug number (simple suffix “… [9999]”). A CVS script checks this during commits and rejects the commit if the message does not conform. The git hook commit-msg does this on the developer side but we find it helpful to have […]

Reference Git branch start commit

I am trying to find how to reference branch start commit from script. I mean the commit sha at which branch was forked. Moreover I expect it work for history made from svn repo. This post just gives first commit of repo creation and not feature branch start commit.

How to I “move” my commits from “no branch” to an actual branch?

I made a mistake, and started making commits “to the last tag”, which lands my commits in “no branch“. They should have been applied at the head of an already existing branch. I have not pushed my changes yet. I’ve found a few other question for when commits are in the wrong branch, but now […]

How to commit no change and new message?

How can I make a new commit and create a new message if no changes are made to files? Is this not possible since the commit’s code (SHA ?) will be the same?

Changing git commit message after push (given that no one pulled from remote)

I have made a git commit and subsequent push. I would like to change the commit message. If I understand correctly, this is not advisable because someone might have pulled from the remote repository before I make such changes. What if I know that no one has pulled? Is there a way to do this?

List all commits for a specific file

Is there a way to list all commits that changed a specific file?

Remove specific commit

I was working with a friend on a project, and he edited a bunch of files that shouldn’t have been edited. Somehow I merged his work into mine, either when I pulled it, or when I tried to just pick the specific files out that I wanted. I’ve been looking and playing for a long […]

How can I split up a Git commit buried in history?

I flubbed up my history and want to do some changes to it. Problem is, I have a commit with two unrelated changes, and this commit is surrounded by some other changes in my local (non-pushed) history. I want to split up this commit before I push it out, but most of the guides I’m […]

How to commit my current changes to a different branch in git

This question already has an answer here: How to merge my local uncommitted changes into another Git branch? 6 answers

Git Baby is a git and github fan, let's start git clone.