Skip to content

Moving to Batmanlab Git organization

Brian Pollack edited this page Jul 3, 2019 · 2 revisions

Transferring a project to batmanlab organization

  1. Open the project, in git hub.
  2. Go to Settings
  3. Keep scrolling down. Go to Danger Zone -> Transfer ownership
  4. Click Transfer
  5. 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
  1. 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.

Update the url in your local git repository.

  • 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.

Maintaining a copy of the project in your own git hub account.

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.

  1. Go to the project in Batmanlab organization. And fork it in your GitHub account.
  2. 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
  3. 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)

Go to the cloned project folder

  1. run git remote -v
  2. result

origin https://github.com/github-username/project-name.git (fetch)

origin https://github.com/github-username/project-name.git (push)

  1. Add a remote upstream
  2. Run git remote add upstream https://github.com/batmanlab/project-name.git
  3. Verify the changes git remote -v
  4. Now you can make commits in the local repository.
  5. 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)
  1. Run git push to push the changes to origin/master
  2. 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)

  1. git pull upstream master
  2. git push