I have a git checkout of an svn repository created via git svn clone. I have a complicated series of changes to my local git repository, which I am delaying pushing to the central svn repo. I would like to push a small change to one file. When using the svn client I would do
svn commit foobar.c
Is there a way to get similar functionality with git?
As long as you didn’t dcommit anything, you are totally able to use anything Git has to offer, including branching and rebasing things. So what you probably want to do is create a branch off the current SVN version (
git branch <name> remotes/trunk) and work on that for now. Then you can dcommit those changes as you are used to.To continue with your other changes then, you could rebase them to match the commits you pushed in between using
git rebase remotes/trunk. Then you are back to a linear history with your later commit in between and continue working on your new features.