iKiR
iKiR

Reputation: 860

Git push to svn keep as multiple commits

I would like to know if there any way to push multiple commits from local Git repository to remote SVN repository and do not merge them into one single commit?

I am using SmartGit and let's say I have 5 commits in my local GIT branch, this branch referenced to remote SVN /trunk, when push those commits to SVN I get one big commit in SVN

Thanks in advance for any help

Upvotes: 2

Views: 442

Answers (1)

simonp
simonp

Reputation: 2867

From your additional comments, it sounds like the problem is your merge. I recommend reading the git merge documentation, particularly the section on "fast-forward merges". It sounds like your client is doing a "no-ff" merge, which combines the commits on branch X into a single merge commit on your main branch. When you push to SVN it's that single merge commit that's being pushed across.

What you want is a fast-forward merge. From the command-line you can ensure you get this by using git merge --ff-only. I'm not familiar with SmartGit, but from the docs it looks like it offers you this option when you request a merge: http://www.syntevo.com/smartgithg/documentation.html?page=commands-branch#merge

Upvotes: 1

Related Questions