Git tips and tricks
71–80 of 143 posts
Re: Git tips and tricks
#72Heya, author here. I have to admit that I learned a lot of these things fairly recently. The large repository stuff has been added into core piece by piece by Microsoft and GitHub over the last few years, it's hard to actually find one place that describes everything they've done. Hope it's helpful. I've also had some fun conversations with the Mercurial guys about this. They've recently started writing some Hg inter…
How about an RSS feed on your blog? If there's one there, it's not obvious.
most of the time trying the main URL + /rss works
also the tag is there https://blog.gitbutler.com/rss/">
Re: Git tips and tricks
#73I do not want to learn git tricks. I just wanna use it as simple as possible. Just let me push my code and be done with git and keep on working. Kudos to all who love git, for me, it's just a tool I have to use.
This isn't a rhetorical question.
Re: Git tips and tricks
#74Also known as the "don't dead, open inside" bug.
Re: Git tips and tricks
#75Heya, author here. I have to admit that I learned a lot of these things fairly recently. The large repository stuff has been added into core piece by piece by Microsoft and GitHub over the last few years, it's hard to actually find one place that describes everything they've done. Hope it's helpful. I've also had some fun conversations with the Mercurial guys about this. They've recently started writing some Hg inter…
[diff]
external = difft
Use the fantastic difftastic instead of git's diff. https://difftastic.wilfred.me.uk/ [alias]
fza = "!git ls-files -m -o --exclude-standard | fzf -m --print0 | xargs -0 git add"
gone = "!f() { git fetch --all --prune; git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D; }; f"
root = rev-parse --show-toplevel
Those are the most used aliases in my gitconfig."git fza" shows a list of modified/new files in an fzf window, and you can select each file with tab plus arrow keys. When you hit enter, those files are fed into "git add". Needs fzf: https://github.com/junegunn/fzf
"git gone" removes local branches that don't exist on the remote.
"git root" prints out the root of the repo. You can alias it to "cd $(git root)", and zip back to the repo root from a deep directory structure. This one is less useful now for me since I started using zoxide to jump around. https://github.com/ajeetdsouza/zoxide
Re: Git tips and tricks
#76I do not want to learn git tricks. I just wanna use it as simple as possible. Just let me push my code and be done with git and keep on working. Kudos to all who love git, for me, it's just a tool I have to use.
Re: Git tips and tricks
#77Earlier quoted context omitted.
Congratulations. You just broke userspace.
You clearly have no idea what you are chattering about. The saying "Don't break userspace" is for the kernel . It has nothing to do with userspace programs potentially affecting other userspace programs.
Re: Git tips and tricks
#78I do not want to learn git tricks. I just wanna use it as simple as possible. Just let me push my code and be done with git and keep on working. Kudos to all who love git, for me, it's just a tool I have to use.
Why even use git then? `scp code server:code` does what you need. This isn't a rhetorical question.
Re: Git tips and tricks
#79I do not want to learn git tricks. I just wanna use it as simple as possible. Just let me push my code and be done with git and keep on working. Kudos to all who love git, for me, it's just a tool I have to use.
I understand your sentiment but git is really not all that hard. And knowing a few things that go beyond bog-standard checkout/commit/push, especially history-rewriting activities, will greatly improve quality of commit-history - which might not be of much use for you but might help other engineers working on your project to make easier sense of what's going on. And on another note, git is probably one of the longer-…