LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How can i update kernel source from git with my own changes in another branch (https://www.linuxquestions.org/questions/linux-software-2/how-can-i-update-kernel-source-from-git-with-my-own-changes-in-another-branch-904759/)

Richard.Yang 09-24-2011 06:10 AM

How can i update kernel source from git with my own changes in another branch
 
I clone my kernel source several days ago, and created a branch for me to do some test and play.

Now I want to update my kernel from upstream. While I still want to keep my changes in another branch.

So:
git pull could be used?
Does this command merge my changes?

andrewthomas 09-24-2011 06:39 AM

You need to explain the steps that you took after the initial clone.

Did you create a new branch?

When a local branch is started off a remote branch,
git sets up the branch so that git pull
will appropriately merge from the remote branch.

Richard.Yang 09-24-2011 08:23 AM

After git clone, I didn't change any code in master branch.

And then I create a branch with git branch new_branch.

Now I want to update my code with the upstream.

Should I first git branch master? Then git pull?


$git branch
master
* pci-nic

andrewthomas 09-24-2011 08:47 AM

I think that you would want to

Code:

git checkout master
git pull


Richard.Yang 09-24-2011 09:16 AM

Thanks

Then after this, master would be the latest code right?

And pci-nic would be the original version. If one day, I want to make this branch also the latest code,
I should

Quote:

git checkout pci-nic
git pull
again?

andrewthomas 09-24-2011 09:24 AM

Quote:

Originally Posted by Richard.Yang (Post 4481015)
Thanks

Then after this, master would be the latest code right?

Yes
Quote:

Originally Posted by Richard.Yang (Post 4481015)
And pci-nic would be the original version. If one day, I want to make this branch also the latest code,
I should
Code:

git checkout pci-nic
git pull

again?

Did you commit your changes to your pci-nic branch?

Richard.Yang 09-24-2011 09:24 AM

$git pull
git.kernel.org[0: 180.168.41.175]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)

---------- Post added 09-24-11 at 10:25 PM ----------

Quote:

Originally Posted by andrewthomas (Post 4481027)
Yes

Did you commit your changes to your pci-nic branch?

Yes, I commit my code in this branch.

andrewthomas 09-24-2011 09:29 AM

You can't use git from kernel.org anymore.

It is on github now.

https://github.com/mirrors/linux


https://github.com/mirrors/linux.git

Read Linus' message

https://lkml.org/lkml/2011/9/4/92

and substitute the above for

the replaced:
https://github.com/torvalds/linux.git

Richard.Yang 09-24-2011 09:34 AM

Anymore? Never?


Then how to config my git to pull from this site?

andrewthomas 09-24-2011 09:39 AM

Quote:

Originally Posted by Richard.Yang (Post 4481038)
Anymore? Never?


Then how to config my git to pull from this site?

Sorry, I forgot to link to his message:

https://lkml.org/lkml/2011/9/4/92

Richard.Yang 09-24-2011 09:48 AM

Thanks a lot.

BTW, does git pull get the tags?
I see some doc on internet mentions git pull will not get tags.
While in the mail from Linus, sees git pull could retrieve tags if it is a origin branch.

Richard.Yang 09-24-2011 09:50 AM

BTW, what are the so long list of those people and title.

Those a patches?

---------- Post added 09-24-11 at 10:51 PM ----------

Hmm....

$git pull https://github.com/torvalds/linux.git
fatal: https://github.com/torvalds/linux.git/info/refs download error - The requested URL returned error: 403

Richard.Yang 09-24-2011 09:53 AM

$git pull https://github.com/mirrors/linux.git
fatal: https://github.com/mirrors/linux.git/info/refs download error - The requested URL returned error: 403

andrewthomas 09-24-2011 09:53 AM

I think that he means for you to:

Code:

git fetch --tags https://github.com/mirrors/linux.git
git pull https://github.com/mirrors/linux.git

Although, I am not sure.

Richard.Yang 09-24-2011 09:56 AM

Quote:

$git fetch --tags https://github.com/mirrors/linux.git

fatal: https://github.com/mirrors/linux.git/info/refs download error - The requested URL returned error: 403
Not sure why


All times are GMT -5. The time now is 07:42 PM.