Reputation: 13
I'm new to git and trying to figure out the best way to copy an existing GitHub.com repository owned by another user to a private git server I have on Atlassian Stash. Ideally we could do a copy at least once a month.
The tedious method I'm doing right now is cloning the GitHub.com repository to a private workstation and then adding a remote to an empty repository in Atlassian Stash and pushing it. This isn't a big deal for one repository, but we have at least a couple dozen we'd like to copy.
From what I've understood I as an owner can setup remotes for a repository to push changes to multiple locations, but I haven't figured out how as a non-owner to pull a repository. There are two plugins available in the Atlassian community and both seem to only offer pushing of repositories to remotes, and not pulling as I need.
Upvotes: 1
Views: 216
Reputation: 70225
If you are creating empty repositories under 'Atlassian Stash' and pushing into them the GitHub.com local clone that you made, then what could developers be using a new repository for every month or so? Sounds like the overall development process isn't working...
Have a single central repository that your developers clone from and deliver their work to. In that central repository have a branch that tracks one or more branches at the remote, GitHub.com repository. You update those remote branches as often as you want by simply using git pull
. Then, every so often, so as not to upset the work of everybody on your team, you carefully merge the remotes into your development branch. Then you team pulls the updated development branch and continues working.
[EDIT]
The process that you are following (cloning GitHub, pushing to an empty Atlassian Stash repository) appears to be exactly as described in Atlassian Documentation for 'Importing Code from an Existing Project'.
I think you have a couple of options:
Upvotes: 1