:: Re: [DNG] Set up a local copy of Da…
Inizio della pagina
Delete this message
Reply to this message
Autore: hellekin
Data:  
To: dng
Oggetto: Re: [DNG] Set up a local copy of Daniel Reurich's branch of my project
On 02/12/2016 04:11 PM, Edward Bartolo wrote:
> Hi,
>
> I would like to set up a local copy of Daniel Reurich's branch of my
> project so that I can help in fixing bugs.
>


For the record, as I'm sure you already figured this out, you can use
`git remote` in your existing repository.

If you run: `git remote -v` you will see "origin" with URIs for fetch
and push. All you need to do to add Dan's branch is to add a remote
pointing to his repository, e.g.:

`git remote add net https://git.devuan.org/net/simple-netaid.git`

Then you can get the code and branches from this repo:

`git fetch net`

Finally you can switch to the wanted branch:

`git co -b local-name net/remote-name`

Git will then follow the net/remote-name branch into your local-name
branch (so you can simply `git pull` and `git push` from and to this
remote branch).

>
> At the end I also need to make sure I can 'git push' my changes to
> Daniel's branch. I have been granted developer access to it.
>


For this to work, you need to use the `SSH` URI for the remote
repository and have developer access to it. Usually I add a remote with
`HTTPS`, and then update the push URI to use git+ssh:

`git remote set-url --push net git@???:net/simple-netaid.git`

==
hk

-- 
 _ _     We are free to share code and we code to share freedom
(_X_)yne Foundation, Free Culture Foundry * https://www.dyne.org/donate/