Actually the question:

  • Created on github a clone of one project.
  • He made his own changes and commited.
  • Now I look in the original too there were kommita.

And how to transfer commits of the original project to your clone? The answer is preferably with an example, and not just a link to git commands.

Shl.

Question on github prog. It has buttons:

  • revert commit (create a new commit that changes in this commit)
  • roll back this commit (roll back this commit leaving all changes made in your working directory)

What exactly are they responsible for and which of them must be used to cancel any commit?

    2 answers 2

    Add original:

    git remote add original git:.... 

    Create a temporary branch

     git checkout -b temp 

    Download all changes from the master branch of the orininal repository

     git pull original master 

    Switch back to the branch where you were

     git checkout - 

    And use either merge or cherry pick.

    I hope that the general idea is clear. If not, read man.

      If you have done exactly clone (that is, just git clone git://some_url ) and now you want to receive changes from the server, then you just need to give the git pull command. She will pull out the changes and try to sg. The truth can sometimes fail and it will be necessary to fix conflicts with pens (if one piece of code was changed by two people, then sometimes a person cannot always merge together correctly). After fixing the conflict, you will need to commit.

      • Not. I just created a clone of someone else's project on my githaba account into my account, which I later downloaded (clone) on my screw and synchronized (commit + push) with my repo on github. And just in the original (alien) repo changes occur. So I need to take the changes (commits or whatever) from there and pour them into my repo. I didn’t find anything like it on the github itself - XaliumX6
      • This is already called fork. And if you look like this, then be very quickly. Just go to the help on github. Specifically for you - the link . You have done the first two steps, but you need a couple more. If you don’t know English, take a translator (there’s a lot of online translators) and translate carefully. Everything is written there in detail. - KoVadim