How do I squash specific commits on a local branch?
I can find a few answers out there that come close to what I want, but I'm afraid I'm not really experienced enough with Git to exactly understand how to achieve what I want.
Given a local branch with commits A-B-C-D-E-F-G-H-I-J on it, I want to squash some of the commits together so that I end up with, for example, the equivalent of A-BCD-E-FGH-IJ.
Is this possible? The intention is to do this to a local branch, after rebasing, but before merging back into the master branch, in order to create a more concise and informative history.
I have multiple branches and for every one i have specific build process. How do i set up gated build process for specific branch? example Development branch -> fast for developers build process th
I do not want to rename a remote branch, as described in Rename master branch for both local and remote Git repositories. Instead, I want to use simplest way to rename local branch, which is not pushe
I'm very new to git, I want to know how to track branch history? For example: echo update README in branch master >> README.md git commit -a -mcommit in branch master git checkout -b b1 echo
How can I see the diff between a local branch and a remote branch?
I would like to include a command to delete a local Git branch in a script, and I don't want any error message to be shown if the branch does not exist. At the same time, I also don't want a status co
I have a branch, mybranch, that has six commits and stems from commit C. I would like to create a new branch, also based on commit C, that effectively includes all the commits from mybranch, squashed
Firstly, I'm aware of a number of similarly worded questions, eg: Why is Git telling me Your branch is ahead of 'origin/master' by 11 commits. and how do I get it to stop? git: Your branch is Ahea
My topic branch is about 20 commits ahead of where I branched from. I would like to automatically squash all these commits into the first commit after the branch. I know I can do this interactively wi
I want to have local branch in my cloned repository that will not exist in main repository. To do this I create branch named new_branch, develop and commit to it. Sometimes I make commites to defaul
I realized I had set my user.name up wrong, so I used this answer to fix the incorrect commits. Locally, it worked great. However, git now tells me $ git status # On branch master # Your branch and '
I have reviewed several related questions about squashing the most recent commits and squashing a commit at the root, but neither will help me squash non-recent commits that are not at the root. Here
In my opinion, in small and dynamic projects, creating many commits during a working day is very common. I started wondering if it is a good idea, to create a githook, which will help squash commits b
I've checked the remote branch Design0.5: the last remote commit on that branch is identical to the top local commit, here marked (no branch). So locally, Design0.5 is 5 commits behind where I'd like
I have a large number of commits, about 20, that I've done since my last push to origin/master. I have never had more than one branch, master, and all commits were done on master. How can I squash all
I am developing in the 'master' branch and want to copy some files from 'feature-1'. How can I do that with TortoiseGit? (I am not interested in command-line solutions.)
For personal projects I use Git for SCM, but at work we use TFS. One thing that I like about Git is that it allows a person to easily squash all the changes made in a branch when pulling the changes b
I done several commits in master branch and next merge them to dev branch. I want to create branch from specific commit in dev branch which is first committed in master branch. I use commands git chec
While trying to use git filter-branch, I duplicated several commits here. How can I fix this?
I'm familiar with using squash to clean up my branch, but the text for squashing is use commit, but meld into previous commit, which will use the message from the previous commit. I wondering if there
My git commits are a bit messed up and I was wondering if I could squash them all together and then extract some commits from that commit. Let's say I have these files in one commit: upload.py, mod
This question seams to deal with rewinding the commits from the master branch. Can I use a similar git reset --soft command on a branch in the repo or should I be trying to make sense of git revert?
I accidentally made 10 commits on branch testing when I meant to make them on branch master. The other commits on the testing branch are garbage, so I don't want to merge it with master. Inste
I want git to forget everything that I have edited in local branch, and want to pull the update from remote branch. I did not know how to do that and I am getting merge conflicts on few files. What
In another question it was recommend that I try resetting a remote tracking branch to an earlier commit and performing an import a second time. I can't figure out how to do that! I can reset master, b
Suppose I have branch A. Now I create new branch B from A and make some commits. Suppose during this time A got a bunch of commits as well. Is there a way to merge those new commits to B such that the
I am using git inside netbeans IDE. I wanted to change the commit message for the most recent commit I had made. I did that, checked the amend last commit checkbox and committed it to my local reposit
I have cloned a git repository and I would like to switch to a particular branch from the following list (e.g. branch1, branch2, branch3) Should I have to say git fetch origin branch2? How do I know t
I have a git tree like A---B---C topic / D---E---F---G master <-- I would like to remove topic and all objects on it. I note the SHA ID of topic, then type: git branch -D topic git gc # <--
I made two commits without pushing them. There have been multiple other commits pushed to my branch. I haven't yet pulled those commits. I want to destroy my two commits that haven't been pushed, and
Let's say I have 2 commits in my git log. Now I want to go back to the first commit and modify some files and add that as the third commit. When I type in git log I want 3 commits to be there on the s
I'd like to move my last few commits from master into a branch of their own. The tree on my PC looks like that: W (some branch) / X1--X2--X3--X4--Y--Z1--Z2 (master) I'd like it to look like: W (som
How do I keep from losing commits if I check out an earlier commit? I want to go back and look at an earlier state that I committed a few days ago. I got the message: you are leaving one commit behind
Is it possible to view a list of merge commits for a branch in git? I'm looking to see only the merges that happened in a particular branch (without the other commits that were included in the merge).
I want to list all commits added to feature branch that are not on master. Something like a list of commits on github pull request page. I've periodically pulled from master but also have some local m
How can I see the differences in a designated file between a local branch and a remote branch? I know this command: git diff <local branch> <remote-tracking branch> But it gives the diffe
I've got a local branch called deployment. This branch is also on origin. How do I reset the local deployment branch to the state of origin's deployment branch? Something like the following: git fetch
The situation: master is at X; quickfix1 is at X + 2 commits then i started working on quickfix2, but by accident took quickfix1 as the source branch to copy, not the master. Now quickfix2 is at X + 2
I have a branch with multiple change sets that I need to code review. I am wondering if there is a way like in git to squash multiple commits into a single commit that contains all the distinct file c
I have a master branch on both local and remote. I have done a number of commits on master branch and have pushed them to remote as well. Now what I have created a new branch x on remote and want to p
Another developer has deleted and rebuilt a remote branch called development which I already have a checked out copy. He did this delete and rebuild to remove some cruft from it. Which is great. But
I am trying to found out the total number of commits made across all repositories hosted on a gitosis install I have. Anyone have any ideas to how I may do this?
Possible Duplicate: How to cherry pick a range of commits and merge into another branch I want to cherry-pick 19 commits from one branch and apply them to another branch. All of the commits are sequ
I have a branch x that was already pushed because there are more of us working on that feature. Now I would like to to rebase it on top of master and squash some commits. My current workflow is: git c
if another developer branches out on branch DEVELOPER_A, and makes a lot of commits on that branch, when he's done, I want to merge his work onto master. but I don't want all his small commits to show
For a while, I worked in with Git in this unusual way: git checkout -b feature123 tiny edit, commit, repeat git checkout master git merge --squash feature123 Use output of git log --oneline to popula
How do we count subversion commits per user
I made a series of commits after a good commit on the master branch, which in hindsight I should have made in another branch. Can I move those commits, beginning with a specific commit, to another bra
I found some solutions on how to recover git branches by using git reflog git fsck I can't reach some commits from deleted branch or any history of deletion of this branch. The local branch is not y
I work in a branch 'develop', and when ready to merge with master, use interactive rebase to squash all my little commits into one feature-encompassing commit which I gets applied on top of master. Wo
This question already has an answer here: Using Git how do I find changes between local and remote 9 answers I'm working in a branch that is remote tracking. I've made several commits. Is there