Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Score of 0
1 answer
104 views

I am a newcomer to Git and am probably missing something basic. My desired practice is to create a branch from main, work on a given release in that branch, and merge to main when release code is ...
Score of 1
1 answer
121 views

I'm working on some projects with a number of submodules, so it's nice to be able to reset the submodules when working on the main project. One way to solve this is by adding a flag to the reset to ...
Score of 0
3 answers
333 views

On a recently cloned project, I just now made an unintentional change/commit to my local main branch. (I had intended to create and check out a new feature branch for the change, but I wasn't ...
Score of 2
3 answers
138 views

My git history looks like this: A---B--------D---F \ / / \____C/__E/ Where head is now at F, and D and F are merge commits. I forget a rebase at E from D, but only realized after ...
Score of -2
1 answer
68 views

Let's say I have a, b, c, d commits on main. I use "git checkout -b new-branch" while on d. On new-branch I make commits e, f. I want to remove d from main, but keep it in new-branch. If i ...
Score of 0
0 answers
49 views

I need to reset all uncommitted Git changes while working in a local Git repository. I'm using this answer to the 12 year old Unstaged changes left after git reset --hard question in a Python script ...
Score of 0
2 answers
67 views

Resetting remote to a certain commit We would like to reset the remote to a certain commit on a specific branch (say branch A) in our project. However there are the following concerns: We recently ...
Score of -1
1 answer
130 views

I have been working on different branches and anytime task is ready I commit and create a pull request into the dev branch. Till now everything is okej, but is there a way to reverse or remove all ...
Score of -1
2 answers
80 views

I can go back and forward in my history using git checkout heads git revert heads git reset heads And when I do git push origin main I get Everything up-to-date and no change on remote server. how to ...
Score of 2
1 answer
300 views

I changed the permissions of all my files and directories of my git repository and committed it to my main branch, eg. mode change 100755 => 100644 path/to/file.sh I wanted to reset now these ...
Score of 0
3 answers
196 views

I know that undoing a single git reset or git reset --hard command has been asked and answered, but I have really messed things up and am not sure how to proceed because I need to undo several ...
Score of -1
3 answers
74 views

Let's say we have a git repo with a master-dev branch. When developers complete their features, each feature branch in merged into the master-dev. One day, A large feature is merged into master-dev ...
Score of -2
1 answer
132 views

How do I reset all (and only) files affected by a given commit to the state before that commit? I only need to reset the files in the commit, not the entire repository or single file/directory, and I ...
Score of -1
1 answer
131 views

I have staged and commited a very large folder (created and only present on my local repository) but then I did git reset hard to revert my big commit which was a mistake. However, luckily, I commited ...
Score of 0
0 answers
72 views

In this case, if you output git log --online, you should see something like this c6 merge iss53 to master c5 c3 c4 c2 c1 ... As you can see, c4,c6 are commits from the master branch, and c5,c3 are ...

15 30 50 per page
1
2 3 4 5
36