tagged [git-commit]

How do I commit only some files?

How do I commit only some files? I have two projects. One is the "official" project and the second is a light modification (some files added). I created new branch and I put new files to them. But in ...

5 Apr at 19:43

Combining Multiple Commits Into One Prior To Push

Combining Multiple Commits Into One Prior To Push This question pertains not only to how to accomplish this task, but to whether doing so is good or bad practice with Git. Consider that locally I do m...

30 Dec at 13:36

Remove a git commit which has not been pushed

Remove a git commit which has not been pushed I did a `git commit` but I have not pushed it to the repository yet. So when I do `git status`, I get '# Your branch is ahead of 'master' by 1 commit. So ...

8 Mar at 18:54

How to undo "git commit --amend" done instead of "git commit"

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 to a particular file...

16 Mar at 13:48

How do I commit case-sensitive only filename changes in Git?

How do I commit case-sensitive only filename changes in Git? I have changed a few files name by de-capitalize the first letter, as in `Name.jpg` to `name.jpg`. Git does not recognize this changes and ...

How to get the last commit ID of a remote repo using curl-like command?

How to get the last commit ID of a remote repo using curl-like command? I want to get the last commit ID of the git repo. The command `git rev-parse HEAD` works for a locally-cloned git repo, but I wa...

15 Jan at 20:53

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

Message 'src refspec master does not match any' when pushing commits in Git I clone my repository with: But after I change some files and `add` and `commit` them, I want to push them to the server: Bu...

Remove sensitive files and their commits from Git history

Remove sensitive files and their commits from Git history I would like to put a Git project on GitHub but it contains certain files with sensitive data (usernames and passwords, like /config/deploy.rb...

How can I revert multiple Git commits?

How can I revert multiple Git commits? I have a Git repository that looks like this: ``` A

14 May at 19:47

How do I make a Git commit in the past?

How do I make a Git commit in the past? I'm converting everything over to Git for my own personal use and I found some old versions of a file already in the repository. How do I commit it to the histo...