I am trying to write a tool that will automatically merge code from one branch to other. It will be a command on hubot that will merge the appropriate branches. What I am looking for is a way to do this merge without cloning the code locally. Is there a way to do this? I am using github so a github api will be helpful as well.
Asked
Active
Viewed 616 times
2 Answers
0
I didnt understand your requirement completely, however, these are steps i use to merge branch from other repo, see if that helps
git remote add -f (remote name) /path/or/URL/to/remote
git merge -s ours --no-commit (remote name)/master
git read-tree --prefix=foo/bar/ -u (remote name)/master
git commit -m "Merged (remote name) into subdirectory /foo/bar"
Thats it.

J-16 SDiZ
- 26,473
- 4
- 65
- 84

Shakul Hameed
- 23
- 2
-
I don't think so. My question is about merging branch "a" to branch "b" in a repository "x" without cloning the repostitory "x" – Spartan Jul 04 '12 at 01:54