Post AxpSAk8Y6C0LEPUZou by [email protected] | |
More posts by [email protected] | |
Post #Axo4rS9sE7EPrjz6xM by [email protected] | |
0 likes, 0 repeats | |
another obscure git question: what's an example of something that `git chec… | |
Post #Axo4rSGxnku2DjIm0W by [email protected] | |
0 likes, 0 repeats | |
@b0rk i can imagine using that in a ci script | |
Post #Axo4rSMzRLiuWQ7aOu by [email protected] | |
0 likes, 0 repeats | |
@tef @b0rk Yeah, for force-creating a release branch, for example. Actually I s… | |
Post #AxpS9ubThOFPP4cwgy by [email protected] | |
0 likes, 0 repeats | |
@b0rk Oh, I didn't know about this, but could have used it earlier today fo… | |
Post #AxpS9ujdD4lloMRSOu by [email protected] | |
0 likes, 0 repeats | |
@b0rk Another possible use: I sometimes create a "temp" branch to try… | |
Post #AxpSA5WZ5zqzH1Pg3s by [email protected] | |
0 likes, 0 repeats | |
@b0rk I was on some feature branch without noticing. Created my feature branch,… | |
Post #AxpSAHYQMuTGaGNKcq by [email protected] | |
0 likes, 0 repeats | |
@b0rk i am on branch dev/last_issue. I have pushed, gitlab has merged into main… | |
Post #AxpSAPD5u6A8KQSPUO by [email protected] | |
0 likes, 0 repeats | |
@b0rk For reviewing GitLab merge requests locally and always having the last ve… | |
Post #AxpSARwXk5honxjjbk by [email protected] | |
0 likes, 0 repeats | |
@b0rk https://stackoverflow.com/q/58032611/308851 this! | |
Post #AxpSASNU7vFy9WLFbM by [email protected] | |
0 likes, 0 repeats | |
@b0rk not to mention https://stackoverflow.com/q/78094959/308851 this as well. | |
Post #AxpSAVmlSOGCinByvA by [email protected] | |
0 likes, 0 repeats | |
@b0rk this sounds like it is equivalent to doing "git reset --hard" b… | |
Post #AxpSAWZgWVONAW53Am by [email protected] | |
0 likes, 0 repeats | |
@b0rk idk if it preserves the branch's current remote tracking relationship… | |
Post #AxpSAk8Y6C0LEPUZou by [email protected] | |
0 likes, 0 repeats | |
@b0rk maybe when checking out a pr or patchset and the branch is either a previ… | |
Post #AxpSAkFzeVxXbUyWQK by [email protected] | |
0 likes, 0 repeats | |
@SRAZKVT @b0rk I use it for this, typically when I forgot to fetch before check… | |
Post #AxpSAlWKxEcvWTd5XM by [email protected] | |
0 likes, 0 repeats | |
@b0rk for scripting, you may want to check out a work branch from scratch regar… | |
Post #AxpSAwNAbepXBEQQHA by [email protected] | |
0 likes, 0 repeats | |
@b0rk repro scripts mostly | |
Post #AxpSAxOGp3IwKvwod6 by [email protected] | |
0 likes, 0 repeats | |
@b0rk although. to be fair. when i say "repro scripts" i mean "s… | |
Post #AxpSAyOJ6OvbRKyMKG by [email protected] | |
0 likes, 0 repeats | |
@b0rk it's.. uh.... it's used quite heavily in the git test suite? 😂… | |
Post #AxpSB0FsAjMzDl2eSO by [email protected] | |
0 likes, 0 repeats | |
@b0rk used it especially in shell scripts that do Git history magic within CI f… | |
Post #AxpSB6HrkEWrvg1KOe by [email protected] | |
0 likes, 0 repeats | |
@b0rk I've never heard of `git checkout -B` before, but I like its similari… | |
Post #AxpSB8jwcoB5XLAmRM by [email protected] | |
0 likes, 0 repeats | |
@b0rk I use `git checkout -B <branch>` when <branch> contains nothi… | |
Post #AxpSBM6OwcriykmOkS by [email protected] | |
0 likes, 0 repeats | |
@b0rk maybe if you have a work PC in the office and at home, and are developing… | |
Post #AxpSBPop7vBKVOaPuC by [email protected] | |
0 likes, 0 repeats | |
@b0rkTIL. Had I known about it, I might have used it from time to time. We use … | |
Post #AxpSBS4UkcuDUZvxbs by [email protected] | |
0 likes, 0 repeats | |
@b0rk I always only use `git checkout -B branch`. I don't care if I have an… | |
Post #AxpSC0fu6320oRhJdg by [email protected] | |
0 likes, 0 repeats | |
@b0rk I sometimes use it as the last step in a manual version of a rebase -i.If… | |
Post #AxpSC2b0xCJClrQRIO by [email protected] | |
0 likes, 0 repeats | |
@simontatham @b0rk A bit of a tangent, but why a detached head rather than crea… | |
Post #AxpSC2hOZTPf5ePXF2 by [email protected] | |
0 likes, 0 repeats | |
@jugglerchris @b0rk one fewer command! If I make a new branch name, I have to c… | |
Post #AxpSC4Hwf4FA1IWEqm by [email protected] | |
0 likes, 0 repeats | |
@b0rk One case I find myself often in is `git checkout -b feature-branch main` … | |
Post #AxpSC7cGHzHGLB30Qy by [email protected] | |
0 likes, 0 repeats | |
@b0rk I use that all the time to tell Git that I want the currently checked out… | |
Post #AxpSC7izswfIg4CNvs by [email protected] | |
0 likes, 0 repeats | |
@KeyJ @b0rk ahh, so like git reset --hard but with roles flipped - "make t… | |
Post #AxpSCM5UU6ybDspXw8 by [email protected] | |
0 likes, 0 repeats | |
@b0rk I was working on a mass-rewrite script today on branch X. Then created br… | |
Post #AxpSCMo9o2hnSPjDYe by [email protected] | |
0 likes, 0 repeats | |
@b0rk TIL. I will start using it when applying kernel patches for review. I cur… | |
Post #AxpSCOJkC5ZA8fVxQm by [email protected] | |
0 likes, 0 repeats | |
@b0rk I’ll use this rather than the relatively common sequence:git checkout -… | |
Post #AxpSCVwdprq7nKlcX2 by [email protected] | |
0 likes, 0 repeats | |
@b0rk Oh I wish I'd known about this earlier! We have a weekly GitHub Acti… | |
Post #AxpSCdgz1y4Hp5VEEi by [email protected] | |
0 likes, 0 repeats | |
@b0rk i use temporary branches as save points while polishing history, so somet… | |
Post #AxpSCmzkRZQSftLqEa by [email protected] | |
0 likes, 0 repeats | |
@b0rk I do it after every release, to regenerate the develop and test branches … | |
Post #AxpSCppvsWMBUJmXqq by [email protected] | |
0 likes, 0 repeats | |
@b0rk I use that pretty often! I'll often run `git checkout -b testo` if I … | |
Post #AxpSD0E3Fhaji18wpk by [email protected] | |
0 likes, 0 repeats | |
@simontatham @b0rk Thanks for such a clear description. I think I wast able to … | |
Post #AxpSDOVwwoAX2Tha40 by [email protected] | |
0 likes, 0 repeats | |
@b0rk I've used it all the time when following many long lived branches and… | |
Post #AxpSDaVKMwnkE1VFlA by [email protected] | |
0 likes, 0 repeats | |
@b0rk thank you for sharing this option. I did not know about it but can see s… | |
Post #AxpSDgjjCJsxYQHq2S by [email protected] | |
0 likes, 0 repeats | |
@b0rkYou created a branch and a merge request, it got merged, someone else work… |