hellatan
hellatan

Reputation: 3577

Ignore git-svn files from `git log`

Is there a way to ignore git-svn updates? my usual workflow:

the only problem with this is that after i git merge master, i do git log -n ###, and i get all the git-svn updates as well. Can i limit it just the latest git commits?

Upvotes: 2

Views: 202

Answers (1)

tfnico
tfnico

Reputation: 5166

No, you can't merge master back into the dev-branch without getting the git-svn commits along for the ride.

The thing is that when you do a git svn dcommit, you actually rewrite the commits that you've cherry-picked from the dev branch. The git-svn commits are now part of your history, and it would be folly to try to get rid of them some how. If I'm guessing correctly, your dev branch is full of merge commits where your git-svn commits are re-joined with your dev-commits because they have diverged. This is messy.

That being said, I'm also unsure if your workflow is optimal. Maybe you should try this:

  1. work work work in the dev branch
  2. git svn rebase on master for the lastest svn changes
  3. Now rebase these latest changes in under your work: git rebase master in dev
  4. Now fast-forward your changes back to master: git merge dev on master
  5. git svn dcommit on master
  6. Now remove the dev branch. Little sense in keeping it since the commits have now been rewritten by dcommit. git branch -d dev
  7. git checkout -b dev for the next feature/fix.

Upvotes: 1

Related Questions