Kulin Choksi
Kulin Choksi

Reputation: 761

How to remote push in another Git repository from different Git repository?

I've checked out read-only Git repository, which is published by someone else for learning purpose. Now, I'm making some changes in local for learning and I've created local branches for different changes.

I cannot push those branches to remote as it's not my repository (no write permission). If I try then get this error:

git-receive-pack not permitted

What I want is, I can push changes so I can save and access those changes remotely from anywhere. I've created my own Git repository but I've not much experience with Git, so not sure how can I save my changes from current repository to my repository.

Also, is it possible that I can continue working in the same remote repository (because sometimes I've to pull changes to remote repository from where I'm learning) and I can push remotely to my repository?

Upvotes: 1

Views: 109

Answers (1)

Huey
Huey

Reputation: 5220

You're probably trying to fork the repository.

A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.

fork

You can continue to pull and merge changes from the original repo, and send pull requests if you've made improvements.

url

After pressing the fork button, update your remote using the clone URL:

git remote add upstream https://github.com/coolzero/infinity.git

Upvotes: 2

Related Questions