Top "Commit" questions

Questions about committing a transaction or "unit of work" to a database, application or version control system.

Message 'src refspec master does not match any' when pushing commits in Git

I clone my repository with: git clone ssh://xxxxx/xx.git But after I change some files and add and …

git commit
How to revert multiple git commits?

I have a git repository that looks like this: A <- B <- C <- D <…

git commit git-revert
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 …

git push commit
How can I push a specific commit to a remote, and not previous commits?

I have made several commits on different files, but so far I would like to push to my remote repository …

git commit push
git add only modified changes and ignore untracked files

I ran "git status" and listed below are some files that were modified/or under the heading "changes not staged …

git commit gitignore staging
Remove specific commit

I was working with a friend on a project, and he edited a bunch of files that shouldn't have been …

git commit revert cherry-pick
How to undo "git commit --amend" done instead of "git commit"

I accidentally amended my previous commit. The commit should have been separate to keep history of the changes I made …

git commit undo amend
How to commit my current changes to a different branch in Git

Sometimes it happens that I make some changes in my working directory, and I realize that these changes should be …

git branch commit
How can one change the timestamp of an old commit in Git?

The answers to How to modify existing, unpushed commits? describe a way to amend previous commit messages that haven't yet …

git timestamp commit git-rewrite-history
How to git commit a single file/directory

Tried the following command: git commit path/to/my/file.ext -m 'my notes' Receive an error in git version 1.5.2.1: …

git commit