Reputation: 26142
Question about standard git/github workflow procedure I think. But I really understand all that stuff very badly.
How should I do this? The problems I faced:
1) I can not fork new version, when I press fork github redirects me to my current fork of new version, do I have to remove it to have new version?
2) Is it possible some how to apply changes I've made to previous version in some automatically manner?
Upvotes: 1
Views: 79
Reputation: 19573
I think you just need to fetch upstream.
$ git remote add upstream [email protected]:original-user/project-name.git
$ git checkout master
$ git checkout -b merge-upstream
$ git fetch upstream
$ git merge upstream/master
At this point, you have the new version on a branch named merge-upstream
. If everything still works from here, you'll want to merge this to your master.
$ git checkout master
$ git merge merge-upstream
Now your master
should be all good with the original master. Delete your working branch.
$ git branch -d merge-upstream
You now have a copy. So you can test your changes against the new master
. Merge master
into your branch to test.
$ git checkout my-feature
$ git merge master
You should now have all of the changes from the original user's master branch merged into your feature branch.
PS: When working on a long-running project, I try to make sure the original master doesn't get more than a day or two ahead of me. In fact, I always add the remote upstream
to point to the original user's repository. Then I can pull in upstream changes whenever I need them.
Upvotes: 4