I like that you can change `git init` to have a different default branch name. At work we've renamed all `master` branches to `main`
Highlights from Git 2.28
41–50 of 147 posts
Re: Highlights from Git 2.28
#42Someone please give me the missing link here: 1. I do `git log` which helpfully pipes to `more` where I can use vim-stsyle search to find the commit I'm interested in. 2. I find the relevant commit. 3. Now I want to `git show` that commit. Currently I double click on the human unreadable commit, copy it, quit `more` to get back to the command line, type `git show`, then paste the commit. Navigate, click-click, shortc…
$ git log | vim -
Inside vim search what you want with '/' When you find the commit you want put the cursor everywhere over the commit ID and run this normal mode command:
:!git show
You will be shown the diff in your default text view program (normally it's 'more' but can also be vimdiff), press when you finish and you will be sent directly to the place where you left off.
You can also remap this behaviour to any key/alias you want.
Hope this helped!
Re: Highlights from Git 2.28
#43Nice to see efforts to reduce barriers to contributing.
Re: Highlights from Git 2.28
#44Re: Highlights from Git 2.28
#45I just came back to git and gitlab from Perforce and while it's felt like coming home and some things are improving around submodules and LFS there's still a lot of rough edges I'd like to see smoothed over. Its not easy to set up git config settings for a distributed team. I assume for security reasons a repo can't configure its own settings just from a pull but even still I want that functionality. Why do I check i…
You can add a small script to your project that you tell people to run the first time after cloning. Then with that script you can setup everything you want. Such as symlinks to git hooks also stored in the repo (so that they stay up to date), or set up the merge tool that you want.
Highly recommend this.
Re: Highlights from Git 2.28
#46Re: Highlights from Git 2.28
#47I wonder about which primary branch naming convention they’ll arrive at. “primary” is my personal favorite ;)
Re: Highlights from Git 2.28
#48I wonder about which primary branch naming convention they’ll arrive at. “primary” is my personal favorite ;)
Github has said the most popular one across all their repos is `main`, and that's what they'll be going with themselves. (Source: https://github.com/github/renaming )
edit: I fixed the script to use branch [0] instead of branch master (using GitPython).
Re: Highlights from Git 2.28
#49I just came back to git and gitlab from Perforce and while it's felt like coming home and some things are improving around submodules and LFS there's still a lot of rough edges I'd like to see smoothed over. Its not easy to set up git config settings for a distributed team. I assume for security reasons a repo can't configure its own settings just from a pull but even still I want that functionality. Why do I check i…
[1]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
Re: Highlights from Git 2.28
#50Earlier quoted context omitted.
I saw somebody on Twitter call theirs "canon", which I've really taken a liking to. It fits nicely in regular speech too :D
I use, and prefer "trunk" since I rarely use branches, but "canon" might change my mind.
But I'm not sure I'd get that much interest from other people to use "mast", it might just be something in my own projects.