On Wed, Jan 06, 2010 at 06:34:37AM -0800, Trans wrote:
So I've cloned a repo, which is a fork of another repo. If I want to
update my repo to match the original (and ditch any changes I may have
made), how do I do it?
Did you follow any workflow guidelines and make your changes on separate
branches from master? If not your simplest option is to delete your cloned
repo and reclone it.
I am using github. So I have my own fork. So it's more involved then
that. I would have to delete my fork, then refork it and then reclone
it. I was hoping for a simple way to update my repo without having to
do all that.
I've just forked my friend's project on github, checked it out,
and it seems that the forked repo is not really tied to the repo
it was forked off: there's just one remote, origin, which is
my forked repo.
So I think you have two ways to solve your problem:
1) Dumb but simple: just re-fork.
2) Smart but complicated:
a) Add original repo, which you forked, as a second remote to your
repo: just grab its read-only URL and do `git remote add ...`
with that URL.
b) Fetch the branches and necessary objects from that remote
using `git fetch REMOTE`.
c) Re-create your local branches from the matching branches from
that remote (this would require some branch renaming and
creation using `git branch ...`).
d) Re-write matching branches in your forked remote branches
using `git push ...` with the -f command-line option.
Otherwise, just delete the branches you no longer need and pull changes from
upstream master to yours. This won't sync other branches from upstream but
you
can make that happen too, especially if you made them tracking branches.
I think you have some reading to do...
Too much reading... and I've already had to read too much as far as I
am concerned.
That's quite impolite, you know.
We're not your personal paid tech support so better make these statements
to yourself, privately.
--
You received this message because you are subscribed to the Google Groups Git
for human beings group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/git-users?hl=en.