I'm sorry It's kind of tricky to explain but essentially.. I'm trying to create a copy of an existing repository. But would it be possible to still get updates from the original repository without it ruining my own changes to the modified repository?
Asked
Active
Viewed 17 times
1 Answers
0
That is no problem at all.
You create a copy of some repository using git clone
, which will create a new repository and a remote with all its remote branches.
You can see your local (possibly modified) branches with git branch
and the remote branches with git branch -r
. You can update the remote branches with git fetch
.
This should be pretty much everything you asked for. - Most probably you also want to integrate your changes with those from upstream. Assuming you have a local branch (e.g. master) tracking a remote branch (e.g. origin/master) you can just use git merge
or git rebase
to get a combination of your changes and those of the original repository.

michas
- 25,361
- 15
- 76
- 121