-
Notifications
You must be signed in to change notification settings - Fork 0
Moving to Batmanlab Git organization
- Open the project, in git hub.
- Go to Settings
- Keep scrolling down. Go to Danger Zone ->
Transfer ownership
- Click
Transfer
- Provide the following details
- New owner’s GitHub username or organization name: batmanlab
- Type the name of the repository to confirm: name of the current project
- Click
I understand, transfer this repository
It will take some time, and after that, the project is moved to the Batmanlab organization.
- If everything went well your project should be listed here
- Your project is no longer visible under your git hub account.
- Open the local git repository folder in the terminal.
- run
git remote -v
- Note the git remote origin URL here is not updated to https://github.com/batmanlab/project-name
- run
git remote set-url origin https://github.com/batmanlab/project-name.git
- Verify the changes by doing a
commit
. The commit should be reflected in the project and visible at https://github.com/batmanlab/project-name - Note: Any commits we make in this local repository will be shown directly on the batmanlab organization project.
As a result of the above change, the project is no longer in your GitHub account. Follow the below instructions to have a local copy of the project under your GitHub account and make the batmanlab organization project as the remote.
- Go to the project in Batmanlab organization. And fork it in your GitHub account.
- Now you can see the project under your GitHub account. It should say something like github-username/project-name (Private) forked from batmanlab/project-name
- You can now clone this repository and start working from there.
Our next goal is to make commits in our local project (forked copy, https://github.com/github-username/project-name.git) and merge those commits with the organization copy(https://github.com/batmanlab/project-name.git)
- run
git remote -v
- result
origin https://github.com/github-username/project-name.git (fetch)
origin https://github.com/github-username/project-name.git (push)
- Add a remote upstream
- Run
git remote add upstream https://github.com/batmanlab/project-name.git
- Verify the changes
git remote -v
- Now you can make commits in the local repository.
- Once you have several commits doing
git status
will show:
# Your branch is ahead of 'origin/master' by 2 commits.
# (use "git push" to publish your local commits)
- Run
git push
to push the changes to origin/master - Run
git push upstream master
to push the changes to the batmanlab organization.
Now suppose there are some commits in the batmanlab organization and you want to sync the local (github-username/project-name) with the remote (batmanlab\project-name)
git pull upstream master
git push