LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-24-2011, 06:10 AM   #1
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Rep: Reputation: 16
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?
 
Old 09-24-2011, 06:39 AM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
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.
 
Old 09-24-2011, 08:23 AM   #3
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
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
 
Old 09-24-2011, 08:47 AM   #4
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
I think that you would want to

Code:
git checkout master
git pull
 
Old 09-24-2011, 09:16 AM   #5
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
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?
 
Old 09-24-2011, 09:24 AM   #6
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Quote:
Originally Posted by Richard.Yang View Post
Thanks

Then after this, master would be the latest code right?
Yes
Quote:
Originally Posted by Richard.Yang View Post
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?
 
Old 09-24-2011, 09:24 AM   #7
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
$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 View Post
Yes

Did you commit your changes to your pci-nic branch?
Yes, I commit my code in this branch.
 
Old 09-24-2011, 09:29 AM   #8
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
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

Last edited by andrewthomas; 09-26-2011 at 06:38 AM. Reason: added links
 
Old 09-24-2011, 09:34 AM   #9
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
Anymore? Never?


Then how to config my git to pull from this site?
 
Old 09-24-2011, 09:39 AM   #10
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Quote:
Originally Posted by Richard.Yang View Post
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
 
Old 09-24-2011, 09:48 AM   #11
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
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.
 
Old 09-24-2011, 09:50 AM   #12
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
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
 
Old 09-24-2011, 09:53 AM   #13
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
$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
 
Old 09-24-2011, 09:53 AM   #14
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
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.
 
Old 09-24-2011, 09:56 AM   #15
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't install Git repo (I don't git git ) Nemus Linux - Software 3 05-20-2011 02:09 PM
Subversion - Share a Branch with outside source nitrohuffer2001 Linux - Enterprise 1 02-26-2009 05:57 AM
inconsistency issue of git-clone ***/git/mesa/drm with the existing kernel source centguy Linux - Desktop 2 10-08-2008 10:36 PM
Can't update Kernel or install kernel source AcidRrat Linux - Kernel 5 07-31-2007 06:25 PM
LXer: Microsoft's Open Source Olive Branch LXer Syndicated Linux News 0 04-06-2006 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration