Track GitHub repo in branch

I am new to Git and I have so many so far, but I'm not sure what to do here.

I forked the github project and am moving it to another language now. For reference, I created a code branch, as it was when I made the plug. My problem is that the original project was updated, and I cannot figure out how to transfer these changes to my branch from the original wizard (because "origin" points to my github project).

The next question for my own education is, what command does the owner of the original project have to follow in order to pull the change from my branch into its main branch?

EDIT: These answers work when I run them from my own "master" branch, but not when I run them from the "tracking" branch (I use this term here freely because I know the git command with the same name, but not sure what he is doing).

When I am in my branch without a host and start git fetch upstream, nothing happens. When I try git fetch upstream:master, he says

ssh: upstream: no address associated with name
fatal: The remote end hung up unexpectedly
+3
source share
4 answers

You can add the original repo with git remote:

$ git remote add upstream http://github.com/user/repo.git

(You can call it something other than upstreamif you want, but this is the name you will use to communicate with the remote control.)

, :

$ git fetch upstream

, , :

$ git remote add drhorrible http://github.com/youruser/yourrrepo.git
$ git pull drhorrible your-branch:master

, , :

$ git pull http://github.com/youruser/yourrepo.git your-branch:master
+3

/

$ git remote add first-repo-name git://github.com/first-repo-name/repo.git
$ git fetch first-repo-name
# or:
$ git pull first-repo-name

git pull ( )

, ?

GitHub , , .

alt text
(: skitch.com)

, ( ), , , , " ".

+1

Git : ( ) . git -merge git -rebase, . , .

, , git -rebase, , .

If you try to do all this from the command line, you will need to learn git -cherry. Otherwise, tools like gitx or gitk are very useful for picking the commits you want to combine.

0
source

Github forking help explains this pretty well:

http://help.github.com/forking/

-1
source

Source: https://habr.com/ru/post/1744273/


All Articles