Reputation: 595
It is a VERY large repo with a few hundred thousand commits and branched 20+ deep. Only the commits with tags that have (-r#) are ones for my hardware. I have a patch that I have applied to the sunxi-v3.4.24-r1 tag.
git clone https://github.com/iceblu3710/linux-sunxi-xenomai
git checkout sunxi-v3.4.24-r1
git branch -t i-pipe-core-uminded
git add .
git commit
git push origin/i-pipe-core-uminded
I then want to rebase that branch with the upstream kernel changes
git for-each-ref --format '%(refname)' refs/tags
NOTE: Any way to get the short hash of the commit with these tags?
That will list all of the tags for the repo, here is whats relevant to me:
refs/tags/sunxi-v3.4.24-r2
refs/tags/sunxi-v3.4.29-r0
How do I go about upstream rebasing my branch to each of those tags in a clean manner?
And my main problem is rebase needs a branch name or hash to work, it does not accept tags and currently I do not know how to find a tag hash other than git log --all | grep "TAG"
which takes quite a while on this big of a repo.
Thanks!
EDIT - Also is their a way to make that sunxi-v3.4.24-r1 tag my repo master and discard ALL of the commits before it? I have tried to use programs like gitk and smartgit but the log is so bloody huge they run out of memory. I will never be merging downstream and only following the upstram branch that that tag is on. ??
Upvotes: 1
Views: 196
Reputation: 7985
To solve your problem to find the tag hash, you can use the following command:
git rev-parse TAG
This will show you the commit hash.
Upvotes: 1