0

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.

Spartan
  • 547
  • 4
  • 12

2 Answers2

1

The github api gives you the ability to perform a merge directly on github's repo without cloning.

See the docs.

Dan
  • 12,409
  • 3
  • 50
  • 87
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
  • 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