LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-15-2018, 04:34 AM   #1
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,264

Rep: Reputation: 60
git is driving me crazy.


ihave been using git for the linux kernel for years, to get different versions, mostly for zen-tune. i am trying to trim down the size of this crazy mess i don't understand. with my old git tree, i can git pull, and get all the new stuff. i tried making a git tree with,
Code:
git clone --shallow-since=2015 http://github.com/damentz/zen-kernel.git
then
Code:
git fetch --tags  --shallow-since=2015
there are various tags listed, but no branches but origin. my old git tree lists tons of branches. why can't i
Code:
git checkout 4.17/zen-tune
in the new git tree?
 
Old 12-16-2018, 02:51 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 11,834

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598
I'm sorry, I don't know the answer, it looks like --shallow-since implies --single-branch.
You can use git clone -b <your-branch> --single-branch --shallow-since=2015 url if you need a single branch (or --no-single-branch).
or you can try git fetch <remote-branch>:<local-branch> if you want to checkout that branch from a shallow clone.
 
Old 12-16-2018, 12:02 PM   #3
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Wellington, New Zealand
Distribution: Slackware, Fedora, NetBSD
Posts: 1,063

Rep: Reputation: 718Reputation: 718Reputation: 718Reputation: 718Reputation: 718Reputation: 718Reputation: 718
I don't want to be pedantic, but 'Origin' isn't a branch, but the name of a remote. It seems that cloned the repo, but you have not pulled any branches; probably for the reason pan64 has identified (I've never used the option, so I'm not sure).

You can pull whatever branch the repo is using as its main branch, which probably is '4.19/master' right now.

View remote branches:

Code:
git branch -a
And then pulling the remote branch into a new local one:

Code:
$ git checkout -t remotes/origin/4.19/master
Branch '4.19/master' set up to track remote branch '4.19/master' from 'origin'.
The -t option sets your new local branch to track the remote one of the same name, such that when you do a git pull, your local branch gets all refs from the designated remote branch.

Last edited by notKlaatu; 12-16-2018 at 12:04 PM.
 
Old 12-16-2018, 06:20 PM   #4
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,264

Original Poster
Rep: Reputation: 60
i'm going to think about these replies, and try the best i can. i wanted to make a much smaller git kernel repository, and was hoping that my previous commands would let me have code, tags, and branches that had been started since that date. as it is now
Code:
git tag      
liquorix_4.17.11-1
liquorix_4.17.12-1
liquorix_4.17.13-1
liquorix_4.17.14-1
liquorix_4.17.17-2
liquorix_4.17.17-3
liquorix_4.17.19-1
liquorix_4.17.19-2
liquorix_4.17.6-1
liquorix_4.17.8-1
list
v4.17.11-zen1
v4.17.12-zen1
v4.17.13-zen1
v4.17.14-zen1
v4.18-zen1
v4.18.1-zen1
v4.18.10-lqx1
v4.18.10-lqx2
v4.18.10-zen1
v4.18.11-lqx1
v4.18.11-zen1
v4.18.12-lqx1
v4.18.12-lqx2
v4.18.12-zen1
v4.18.13-lqx1
v4.18.13-zen1
v4.18.14-lqx1
v4.18.14-zen1
v4.18.15-lqx1
v4.18.15-zen1
v4.18.16-lqx1
and maybe 20 more after that, but
Code:
git branch -a
* (HEAD detached at v4.17.14-zen1)
  4.19/master
  remotes/origin/4.19/master
  remotes/origin/HEAD -> origin/4.19/master
this is after checking out one of the tags.
how should i have gone about doing this while getting the branch names listed?

my large git tree? repository? shows
Code:
git branch -a 
  4.14/zen-tune
  4.15/zen-tune
  4.16/zen-tune
  4.17/zen-tune
* 4.18/zen-tune
  4.19/zen-tune
  4.2/zen-tune
  4.3/zen-tune
  4.4/zen-tune
  4.6/zen-tune
  4.8/zen-tune
  4.9/zen-tune
  list
  zen-tune
  remotes/origin/3.14/adbsyn
  remotes/origin/3.14/aufs
  remotes/origin/3.14/bfq
  remotes/origin/3.14/bfs
that is only a tiny part of what actually listed.
 
Old 12-17-2018, 12:17 AM   #5
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,264

Original Poster
Rep: Reputation: 60
the --no-single-branch option added does what i wanted. thanks.
 
Old 12-17-2018, 03:40 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 11,834

Rep: Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598Reputation: 3598
glad to help you. If you really want to say thanks just click on yes.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Gitpod git-bolts git-IDE onto GitHub for in-browser code git-editing LXer Syndicated Linux News 0 09-05-2018 05:50 AM
[SOLVED] Can't install Git repo (I don't git git ) Nemus Linux - Software 3 05-20-2011 03:09 PM
Mozilla is driving me crazy! MrPolite Linux - General 39 07-27-2004 05:57 PM
security issue is driving me crazy safra Linux - Security 10 07-18-2002 12:58 PM
Damn booting! ´HLT´ instructions are driving me crazy! Racso Linux - Software 3 01-07-2002 06:25 PM

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

All times are GMT -5. The time now is 09:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration