# Special branch for remote

3 messages from 2011-07-27 to 2011-07-27. Participants: Paulo J. Matos, Phil Hord.
Thread: https://gitlist.dev/t/27932

## Paulo J. Matos, 2011-07-27 08:18

Subject: Special branch for remote
Message-ID: <j0ohjr$fcd$1@dough.gmane.org>
URL: https://gitlist.dev/e/j0ohjr%24fcd%241%40dough.gmane.org

```
Hi all,

I have a huge repository for a software I am developing. In it I have 
source code, docs, experiments, tests, etc. However, I want to push only 
the src/ to the github remote, nothing else. What's the best way to 
achieve this. Do I need to simply create a new branch and then push the 
new branch to github or there's anything else involved that I need to know?

Cheers,

-- 
PMatos

```

## Phil Hord, 2011-07-27 14:35

Subject: Re: Special branch for remote
Message-ID: <4E302229.4030402@cisco.com>
URL: https://gitlist.dev/e/4E302229.4030402%40cisco.com
In-Reply-To: <j0ohjr$fcd$1@dough.gmane.org>

```
On 07/27/2011 04:18 AM, Paulo J. Matos wrote:
> Hi all,
>
> I have a huge repository for a software I am developing. In it I have
> source code, docs, experiments, tests, etc. However, I want to push
> only the src/ to the github remote, nothing else. What's the best way
> to achieve this. Do I need to simply create a new branch and then push
> the new branch to github or there's anything else involved that I need
> to know?
>

Yes, you can do this with branches. See [1] for an example of a similar
workflow.

You can also manage this with submodules [2] or subtree-merge [3].

I prefer submodules since it keeps the huge stuff (docs and bins) away
from my source code and makes my source code repo much more responsive.

[1] http://www.braintreepayments.com/devblog/our-git-workflow
[2] http://progit.org/book/ch6-6.html
[3] http://progit.org/book/ch6-7.html

HTH,
Phil

```

## Paulo J. Matos, 2011-07-27 14:36

Subject: Re: Special branch for remote
Message-ID: <j0p7pc$q51$2@dough.gmane.org>
URL: https://gitlist.dev/e/j0p7pc%24q51%242%40dough.gmane.org
In-Reply-To: <4E302229.4030402@cisco.com>

```
On 27/07/11 15:35, Phil Hord wrote:
>
> You can also manage this with submodules [2] or subtree-merge [3].
>
> I prefer submodules since it keeps the huge stuff (docs and bins) away
> from my source code and makes my source code repo much more responsive.
>

Thanks Phil, I will be looking at this solution then.

Cheers,
-- 
PMatos

```
