I have cloned the repository. The master branch has been cloned. there is still an edit branch.

How do I get this thread, do merge with master , and then send everything to the main repository?

    2 answers 2

    if you change the default name of the remote repository - origin , then substitute your own. Fill in the current branch ( master ) commits from the edit branch of the remote origin repository:

    $ git merge origin/edit 

    after making all the necessary changes (after which you need to perform git commit ), you can send changes from the current branch ( master ) to the branch assigned to the push in the remote repository like this:

     $ git push 

    if you are going to execute this command for the first time after cloning, then you will need to assign a branch to push in the remote repository. The command to send will look like this:

     $ git push -u origin master 

      If I understood everything correctly, then so:

       git fetch git checkout -b edit 

      Edit everything in the edit branch, commit changes to it. When done:

       git checkout master git pull origin master:master //не забываем загрузить себе всё самое последнее из мастера, если там что-то появилось git merge edit 

      If conflicts come down, we resolve them and are dominated.

      • thanks, and how to resolve conflicts? - Diefair
      • Well, he (git) will say in which files conflicts (they may not be). Go to this file (or files), there will be pieces from both branches (git could not decide which branch is preferred), decide what should be and write to this place. In general, here is a link with examples. - Mr. Brightside