Explain the basic thing. I work locally with a clone of my fork in someone else's repository. Narefaktoril much, but for several reasons I can not commit yet.

PS C:> git branch -r origin/HEAD -> origin/master origin/dev origin/master PS C:> git branch * dev-my-feature master 

At the same time, the original source issued a new release, conflicting with my changes. I want to continue to have both branches - both his and mine (the one where my changes are priority).

First of all, I do not understand how to synchronize my repository with the original one.
Well, and how to compare your unfamiliar stash with someone else's new release.

  • one
    Right below they say, google on the notion of topic branch . - 0andriy

1 answer 1

for some reason I can't commit yet

The commits are made for free and can be combined later. Make your commits to the new branch, and update the master from the original repository, which you forked.

First of all, I don’t understand how to synchronize my repository with the original

You need to add the original repository as a new remote :

 git remote add upstream git@github... git fetch upstream 

Now you can compare your local branch and upstream/master

  • If commits don't cost anything, then how can I prevent this commit from syncing with my fork on the githaba? I do not want to publish this. - sundmoon
  • one
    @sundmoon make it to another branch, not to master , and don’t push this branch to github. - Nick Volynkin
  • @sundmoon so how come? Ask questions if anything else is not clear. - Nick Volynkin