git-rebase

Is it possible to do a git-rebase after doing a git-commit

I started to rewrite some of the Perl programs from the NASM source files. I have already done a few commits to my own working copy, and I was wondering if I should have instead of doing git pull, if I should have been doing git rebase. I have pretty much decided that I should have been doing a git rebase, but I don't know how to rework...

Git: How to rebase many branches (with the same base commit) at once?

Hi, I have a master branch in my project, that I use to pull changes from other people. From that, I usually have several topic branches on which I'm currently working. My question is: Is there a way for me to pull new changes into my master and then rebase ALL of my topic branches onto that at once? This is the situation: D-...

detect conflicts after git-svn rebase

I'm using so many git-svn repositories (at the same time) that it's becoming a chore to update them all. I'd like to write a script that automates this, so I can just run it every morning while I fetch a coffee. Basically my workflow is like this cd ~/module1 git svn fetch git checkout master git svn rebase git checkout topicbranch gi...

What are the practical consequences of rewriting GIT history ?

Our project has been using git for a week or so now, and we're all enjoying it a lot (usíng it in a tight collaborative group turns out to be quite a different git experience). To keep things as simple as possible, we do not do any rebasing or history modifications. But we did make a few mistakes in the first week. A few commits were mad...

change timestamp while rebasing git branch

I used to know this but I guess this is one of the things one uses so seldomly that it's easy to forget how it is done: I have reorganized the commits in a branch before it is going to be made public causing the timestamps of the commits to be in an mixed up order. I would rather have them be all be today with only So how do I tell gi...

Rebase-push cycles for git branches

I'm currently using a github repository with a single branch, based of a master branch of another repository. The github branch is a backup of my work, and definitely not meant for pulling, and as such I'm comfortable with rewriting its history when rebasing from the master repository. My problem is that I want a clean history, and if h...

Why do I get conflicts with git rebase -p -i ?

I'm using git rebase -p -i SHA1^ And moving a single commit backwards in time to just after SHA1. The commit consists of a WAV file, so there's no way this is breaking my code. Seemingly unrelated files pop up in conflicts later in history. Why am I getting these conflicts during the rebase in this scenario? Isn't -p enough to keep...

Git squash all commits into a single commit

How do you squash your entire repository down to the first commit? I can rebase to the first commit, but that would leave me with 2 commits. Is there a way to reference the commit before the first one? ...

Change old commit message on Git

Hi, I was trying to edit an old commit message as explained here. The thing is that now, when I try to run rebase -i HEAD~5 it says interactive rebase already started. So then I try: git rebase --continue but got this error: error: Ref refs/heads/master is at 7c1645b447a8ea86ee143dd08400710c419b945b but expected c7577b53d05c91026b99...

GIT undo a commit that isn't the most recent, rebase all commits since.

Earlier on, I committed some code which at the time seemed like a good idea, but in fact it made things worse. I'd like to remove the change from the history as it is not helpful, and rebase all commits since - they should all merge without issues. I tried creating a new branch (called newMaster) immediately before the bad commit (with ...

How do I edit the initial commit in a github repository?

I'm working on a repository I forked in which the author took the dirty path and stuffed all his dependencies in the lib/ directory in the initial commit. Normally, if it wasn't the initial commit, I would just do an interactive rebase and delete the entire commit (if that's all he did). However, I have no idea how I would edit/delete th...

How to purge a huge file from commits history in Git?

Occasionally I dropped a DVD-rip into a website project, then carelessly git commit -a -m ..., and, zap, the repo was bloated by 2.2 gigs. Next time I made some edits, deleted the video file, and commited everything, but the compressed file is still there in the repository, in history. I know I can start branches from those commits and ...

How to identify conflicting commits by hash during git rebase?

When I encounter a merge conflict using git rebase, how can I identify the source of the conflict in terms of commits, rather than just file differences? I already know how to make (basic) use of git mergetool or git add before git rebase --continue, but sometimes the differences between files just isn't enough: I want to see the commit...

Undoing a git pull --rebase

Hey I'm new to git and I need to undo a pull, can anyone help?!? So what I've done is... git commit git stash git pull --rebase git stash pop this created a bunch of conflicts and went a bit wrong. Now doing 'git stash list' reveals that my stash is still there. Is it possible to revert my repo back to the point just after doing git ...

How to push/pull Git rebase

I'd like to use git rebase so as to cleanly merge a feature in the master branch (in less commits or at least at the top of the change log). Note that I'm the only one working on the repository. After reading http://stackoverflow.com/questions/457927/git-workflow-and-rebase-vs-merge-questions, I found git rebase would be pretty nice and...

Change first commit of project with git?

I want to change something in the first commit of my project with out losing all subsequent commits. Is there any way to do this? (I accidentally listed my raw email, and I'd like to change it as I'm getting spammed from bots indexing github.) Edit/Addendum (whereby "listed my raw email" I mean listed my raw email in a comment in the ...

Strange git merge issue

This is how gitk currently looks in one of our projects: https://dl.dropbox.com/u/2582508/gitk.png This apparently, from all we can tell, happened after a single "git merge" was done with a remote branch - we're not sure why or what is going on. Any idea what happened here? More importantly, what's the best way to fix it? Those merge ...

How can I move commits from the trunk to a branch in Git?

I made a bunch of commits to the master and realized after the fact that they should have been in a branch. I've looked at various things about rebasing and merging and resetting the master. But no attempts at manipulation have yielded a history that looks like what I'm trying to do. My attempts lead me to believe it requires some comb...

git: how to not delete files when rebasing commits with file deletion

I have a branch that I would like to rebase onto the lastest commit on my master. The problem is that one of the intervening commits on master was to delete and ignore a particular set of files (see this question). If I just do a straight rebase, those files will get deleted again. Is there anyway of doing this, inside git, rather than...

How to resync git with svn tree?

Background I'm adding some features to a project that uses subversion - I'm using git-svn to clone it to my local repository, git-svn rebase to keep with the recent changes in the official trunk and keep the history linear. Recently I've forgot myself and made a few merges which messed my rebasing - long story short I needed to spend ...