1
git version 1.7.4.1
Ubuntu

Currently I am working on a project at my company. Our git repository is on our local LAN server.

I have a private repository on unfuddle.

So I have cloned my project on my work's company and created some branches that I am currently working on.

I have a branched called i.e. work_branch.

I am wondering if I can import that work_branch into my unfuddle respository. However, I don't want to do this if it will affect my current working copy of my git repostory at work.

So basically I just want to add to this unfuddle repository. So I can push my changes to it. As well as our LAN Server.

Many thanks for any suggestions,

ant2009
  • 27,094
  • 154
  • 411
  • 609
  • 1
    http://stackoverflow.com/questions/1911109/git-clone-a-specific-branch – Marcin Gil Jun 03 '11 at 10:26
  • possible duplicate of [How do you make an existing git branch track a remote branch?](http://stackoverflow.com/questions/520650/how-do-you-make-an-existing-git-branch-track-a-remote-branch) – Andrew Aylett Jun 03 '11 at 11:57

2 Answers2

2

From your repository on your work computer you can just push your branch called work_branch to your unfuddle repository. First you have to set up a "remote" that refers to your unfuddle repository, e.g.:

 git remote add unfuddle <URL-of-the-unfuddle-repository>

Thereafter you can push the branch to that respository with:

 git push unfuddle work_branch
Mark Longair
  • 446,582
  • 72
  • 411
  • 327
1

You are looking for git submodules.

Check this docs

Felipe Sabino
  • 17,825
  • 6
  • 78
  • 112