tagged [commit]

How do I reverse a commit in git?

How do I reverse a commit in git? I'm not really familiar with how git works. I pushed a commit by mistake and want to revert it. I did a and now the project is reverted on my machine, but not on git...

14 Dec at 19:14

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...

How to rollback everything to previous commit

How to rollback everything to previous commit Recently in a project with multiple people, a commit was made as seen in the image below. Marked in red you can see a commit with the description/comment ...

20 Dec at 20:35

Removing multiple files from a Git repo that have already been deleted from disk

Removing multiple files from a Git repo that have already been deleted from disk I have a Git repo that I have deleted four files from using `rm` ( `git rm`), and my Git status looks like this: How do...

24 Jun at 06:12

How to add multiple files to Git at the same time

How to add multiple files to Git at the same time This will be my first git use. I have added new files ( a lot ) to the folder/project ( git local repository). I went through online tutorials and for...

27 Jul at 18:43

Git error on commit after merge - fatal: cannot do a partial commit during a merge

Git error on commit after merge - fatal: cannot do a partial commit during a merge I ran a `git pull` that ended in a conflict. I resolved the conflict and everything is fine now (I used mergetool als...

How to move certain commits to be based on another branch in git?

How to move certain commits to be based on another branch in git? The situation: - - Such that: Then I started working on quickfix2, but by accident took quickfix1 as the source branch to copy, not th...

19 Oct at 09:13

GIT commit as different user without email / or only email

GIT commit as different user without email / or only email I'm trying to commit some changes as a different user, but i do not have a valid email address, following command is not working for me: I ha...

25 Aug at 22:57

SVN- How to commit multiple files in a single shot

SVN- How to commit multiple files in a single shot I tried to commit multiple files across different directories in a single shot as below, Since, I wanted to exclude some files from the commit list s...

2 Dec at 13:56

git status (nothing to commit, working directory clean), however with changes commited

git status (nothing to commit, working directory clean), however with changes commited I found many questions with similar subject, but I didn't found any practical guidance about this issue: why `git...

20 Dec at 01:41

Make the current commit the only (initial) commit in a Git repository?

Make the current commit the only (initial) commit in a Git repository? I currently have a local Git repository, which I push to a Github repository. The local repository has ~10 commits, and the Githu...

19 Feb at 20:54

How to remove selected commit log entries from a Git repository while keeping their changes?

How to remove selected commit log entries from a Git repository while keeping their changes? I would like to remove selected commit log entries from a linear commit tree, so that the entries do not sh...

12 Sep at 13:22

How to configure Git post commit hook

How to configure Git post commit hook How to trigger a build remotely from Jenkins? How to configure Git post commit hook? My requirement is whenever changes are made in the Git repository for a parti...

4 Jan at 09:55

Can't auto-generate IDENTITY with AddRange in Entity Framework

Can't auto-generate IDENTITY with AddRange in Entity Framework I don't know if it's an Entity Framework's desing choice or a wrong approach on my behalf, but whenever I try to AddRange entities to a D...

How to output git log with the first line only?

How to output git log with the first line only? I am trying to customize the format for `git log`. I want all commits to be shown in one line. Each line should only show the first line of the commit m...

git add only modified changes and ignore untracked files

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 for commit". It also listed some...

19 Aug at 16:40

How can I fix git commit error "Waiting for your editor to close the file..." with VS Code?

How can I fix git commit error "Waiting for your editor to close the file..." with VS Code? I'm trying just `git commit` and Git is giving this message: > hint: Waiting for your editor to close the fi...

18 Sep at 04:37

git: Your branch is ahead by X commits

git: Your branch is ahead by X commits How does this actually come about? I am working in one repo by myself at the moment, so this is my workflow: 1. Change files 2. Commit 3. Repeat 1-2 until satisf...

29 Sep at 13:30

Why Git is not allowing me to commit even after configuration?

Why Git is not allowing me to commit even after configuration? This question seems like a duplicate but it's really not. Just a slight difference that keeps on repeating. git keeps on telling me: "ple...

2 Feb at 16:59

What does "Changes not staged for commit" mean

What does "Changes not staged for commit" mean I thought if you want to track the files you should `git add [files you want to track]` I don't know why I got the messages `Changes not staged for commi...