0

I am working on 2 remote branches one is commercial and other one is sequential

now in my app

cd myapp

myapp>git remote -v
comercial   https://git.heroku.com/comm.git
sequential  https://git.heroku.com/seq.git 

Now I want to pull the commits from 1st jan to 28th jan from sequential branch how can I do it

like

git pull sequential fromdate todate 

is it possible?

If it is not possible then only cherrypick is the option or any other option or advice is really appreciable

Rajarshi Das
  • 11,778
  • 6
  • 46
  • 74

2 Answers2

1

You can start with a shallow clone and then use git fetch --depth or --deepen (i.e. instead of dates you use number of commits). But you must understand that shallow clones are not fully functional clones though the limitation is being lifted.

phd
  • 82,685
  • 13
  • 120
  • 165
0

I don't think that it would make any sense.

I mean if you have a tree, and you don't pull commits what is not in your range, then it would be 2 trees, not one. Git not meant to track magickal gapes in your commit chain. Also, what would be the benefits you having a chunked part of a repository?

If you sure you just need a part of a branch(typically, multiple active release branches related problem), then create a new one, and rebase/cherry-pick the needed commits. But again, you will be missing the "middle" section, so get ready for some fun conflict times.

You can check out a particular commit tho, but you still need to pull all changes, or your directed tree would just be just like twigs, and logs :D

BTW if i may ask: what is your agenda here? Why would you need to pull it like this?

PS: if you want a shallow copy for builds, you can use the --depth with fetch/clone.

MrKekson
  • 720
  • 6
  • 18