Linked Questions

2 votes
2 answers
2k views

I'm beginner in GIT. I did some changes in my working project and created the the test branch using git checkout -b 'test' I committed my changes twice. git add . git commit -m "first commit" git ...
pramod m's user avatar
0 votes
1 answer
726 views

I was working in branch "Feature". So my git tree was: master A<--B<--C<--D<--F<--G |<--E Feature I wanted to get all the latest of ...
Jim's user avatar
  • 19.7k
1 vote
0 answers
329 views

If I execute git log, I see on the top two commits done by me. Each commit comes with its change ID. Now I would like to squash this commit into one. It means that I want these two commits to come as ...
Roman's user avatar
  • 132k
5792 votes
47 answers
4.7m views

How do I squash my last N commits together into one commit?
markdorison's user avatar
522 votes
8 answers
430k views

I have a bunch of commits on my local repository which are thematically similar. I'd like to combine them into a single commit before pushing up to a remote. How do I do it? I think rebase does this, ...
muudscope's user avatar
  • 7,098
316 votes
5 answers
70k views

I'm a bit new to the whole rebasing feature within git. Let's say that I made the following commits: A -> B -> C -> D Afterwards, I realize that D contains a fix which depends on some new ...
Nik Reiman's user avatar
  • 40.7k
404 votes
2 answers
106k views

I've submitted a change to an Open Source project on Github, and received code review comments from one of the core team members. I would like to update the code taking into account the review ...
Orion Edwards's user avatar
170 votes
5 answers
250k views

I have a branch 'firstproject' with 2 commits. I want to get rid of these commits and make them appear as a single commit. The command git merge --squash sounds promising, but when I run git merge --...
Don P's user avatar
  • 64.3k
30 votes
2 answers
37k views

I'm trying to rebase and squash all my commits from current branch to master. Here is what I'm trying to do: git checkout -b new-feature make a couple of commits, after it I was trying: git rebase -...
Viacheslav Kondratiuk's user avatar
41 votes
2 answers
17k views

I'm new to git (and enjoying it a lot!). While developing in a new branch, I kept committing the various development 'states' of my application. Now I have to check it in for review but didn't want ...
DiogoNeves's user avatar
  • 1,787
16 votes
5 answers
21k views

When I do git rebase --interactive, I have six basic commands: pick, reword, edit, squash, fixup and exec. What does pick command do? Does it cherry-pick a commit or does it checkout it?
user983447's user avatar
  • 1,737
11 votes
4 answers
18k views

I have a bad commit from a long time ago, I want to remove it completely from git history as if it never happened. I know the commit id let's say 1f020. I have tried git rebase and remove it , but ...
sonnyhe2002's user avatar
  • 2,129
5 votes
3 answers
2k views

I have made 2 'git commit' locally. But I have not pushed, is it possible for me to edit my git and combine those 2 git commit into 1?
michael's user avatar
  • 111k
1 vote
5 answers
3k views

I am not sure if this is a duplicate and I am not a git expert, so forgive me for what may seem like a stupid question. I have a file. I edited it, saved and committed those changes. I forgot I had ...
Francis Davey's user avatar
10 votes
1 answer
1k views

In my repository I currently have this history: $ git log --oneline <commit-id-1> Merge commit '<merged-commit-id-1>' into <branch> <commit-id-2> Merge commit '<merged-...
user5365198's user avatar

15 30 50 per page