work with Git and GitHub



  • In general, there is a site on a separate hosting where the work site on another host is being refined and, in both cases, a git is installed on the hosting site.

    The code goes ssh to the test site by the team. git branch I see that I'm in a branch I need where I'm going to be refined after I'm done with the truths of the commite, git push origin my_test_branch

    After I walk into the GitHub account, and as I understand it, it's the button that's responsible. Pull requests All files that are affected and conflicts with the branch are so understood. masterThen I understand that I combine the branches with the button. merge There's no such thing as merging successful conflicts, but there's a question about how to see changes on the work site?

    Should we go over SSH and do some git crews? If I pick up git branch, I don't see my branch there because I didn't build repositories on the host?

    Help me figure it out, it's real, and you need to do it very urgently, so you wrote it here, git's only been working for a few hours, I'm sorry if you said something wrong.



  • The simplest single wolf:

    • Come on. hosting ssh,

    • Web server structures prohibit access to folder .git, or initiate repositories to level higher (for the directory to be inaccessible to clients through browser)

    • git init && git add . && git commit -m "init"

    • local computergit clone ssh://хостинг/путь/к/каталогу/c/.git/make changes, then. git add . && git commit -m "changes" && git push

    • The rest of the repositories add like git remote add upstream путь_к_гитхабу_или_другому_компу

    You'll have the main site on default remoute with the name of origin, for other remodels, you'll choose the names.

    Let's say someone changed the code to guitabeYou're doing it. Local computer:

    git fetch upstream # I've made changes guitar

    git merge upstream/имя_ветки_с_изменениями # Died in the current branch of change with the pestrimiumHithab)

    If the arc passes with the conflicts, rule the pens, or git difftool (meld, etc.) / or intellijidea, where the device is perfect.

    git push origin # Make changes hosting

    If you wish, of course, you can add directly to hosting In practice, it's uncomfortable, and in lieu of two relevant copies of the website code (both you and the host) you have only one.

    The rest of the Google.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2