Repository Synchronization - GIT

1

Well, I'm working on a project in college and I had some issues with using git when syncing a repository. More precisely, I received the following usage instructions:

  • The master branch is the primary and should never receive a test / unnecessary / irresponsible push / pull request.
  • First of all, update the repository. Remember that your fork is not automatically synchronized with the project.
  • Always update your repository before you start coding and always keep your code as up-to-date as possible to avoid conflicts.

I followed some tutorials on the internet of synchronization such as what github itself offers (for those interested: link ), but almost all of them are in English, which makes my understanding to a certain extent difficult (even with translations getting a bit difficult to understand) and few really explain how I synchronize the MY repository that has been "forkado" with the MAIN repository of the project. Can anyone help me or give me some way to go? It is noteworthy that I use Linux. Thank you very much in advance. :)

    
asked by anonymous 26.11.2016 / 02:17

1 answer

4

I'm assuming you've already installed GIT on your local machine and you already have an idea of how it works. If you already made the fork, you should now clone the design to your machine. There is a green button in the upper right corner of the project that you click and it copies the link:

Then enter the directory where the project will be, type the command: git clone followed by the copied link of the project:

Next,enterthecreateddirectory(intheSpoon-Knifecase)andtheoperationsarebasicallythese:

Toupdateyourlocalrepository:

  • gitfetch:retrieveschangesmadetotheremoteserver;

  • gitpull:downloadsallremotechangestoyourlocalrepository;

  • Tosubmityourlocalchangestotheremoterepository:

  • git add -A

  • git commit -a -m "Descrição" -m "Detalhamento do commit"

  • All of this information is here . Cool tutorial here .

        
    26.11.2016 / 02:47