Striving to become a master Go/Cloud developer; Father ๐จโ๐งโ๐ฆ; ๐ค/((Full Stack Web|Unity3D) + Developer)/g; Science supporter ๐ฉโ๐ฌ; https://coder.today
I use the rebase feature every day many times because do not like mess in my git repositories. Of course when I work with other people i don't use the force flag.
Striving to become a master Go/Cloud developer; Father ๐จโ๐งโ๐ฆ; ๐ค/((Full Stack Web|Unity3D) + Developer)/g; Science supporter ๐ฉโ๐ฌ; https://coder.today
I applaud this. I think it's great when developers leverage each other's existing tools to simplify common tasks. To me it seems like this tool abstracts the complexities of git commands, why not just use a tool like SourceTree or GitKraken? They are visual tools that do a lot of heavy lifting for you and have imo made my life so much easier. BTW I don't work for either of those nor do I get any kind of compensation from them, but I think they are worthwhile tools if the goal is to make life easier
Careful with that force flag, though! (I use the that flag less than once a month, but reading your other comments, I also barely ever rebase).
Note that when I use git commit --amend, I use -CHEAD about 90% of the time.
What are the --smart flags? Is that a new feature? I'm on git 2.15.1 and don't see it in the man page, or when I try using them just to see if they work.
For git log --pretty, I spent a day reading the man page, and wound up with a helper, which is aliased to git log --pretty=format:'%Cgreen%h%Creset %Cblue%ad%Creset %s%C(yellow)%d%Creset %Cblue[%an]%Creset' --graph --date=short, it tends to be as terse as git log --format=oneline, but also includes the useful author and branch info of git log --pretty.
A mind at work. Microsoft MVP && Passionate .NET dev lead && VP, Innovation and Products at SCT Software. Opinions here are mine. Trying to be all the human I can be with the time I have.
Hey! I've noticed that in this post you use "guys" as a reference to the entire community, which is not made up of only guys but a variety of community members.
I'm running an experiment and hope you'll participate. Would you consider changing "guys" to a more inclusive term? If you're open to that, please let me know when you've changed it and I'll delete this comment.
First of all thanks for your sharing
Second, if you are using z shell (zsh, if you are not using it, leaving everything and read about it now, it's amazing!) you can use the git plugin which is super cool
gcam - git commit -a -m
gp - git push
gl - git pull
gb - git branch
gst - git status
It saves me minutes (even hours) a day just using those aliases.
You are using the force flag everyday, OMG I hope we will not be co-workers ...anytime ๐
I use the rebase feature every day many times because do not like mess in my git repositories. Of course when I work with other people i don't use the force flag.
It depends on the circumstances. If he is developing a branch alone and needs to correct his PR and push again for review, what would you do?
If you want to remove the history you don't have much of a choice, it was a joke.
I would use
git merge squashand instead of --force flag I would use--force-with-leaseto avoid possible data loss.I applaud this. I think it's great when developers leverage each other's existing tools to simplify common tasks. To me it seems like this tool abstracts the complexities of git commands, why not just use a tool like SourceTree or GitKraken? They are visual tools that do a lot of heavy lifting for you and have imo made my life so much easier. BTW I don't work for either of those nor do I get any kind of compensation from them, but I think they are worthwhile tools if the goal is to make life easier
I agree with you about the tools but i use vim a lot and prefer using command line. That's people choice what to use :)
Nice!
Careful with that force flag, though! (I use the that flag less than once a month, but reading your other comments, I also barely ever rebase).
Note that when I use
git commit --amend, I use-CHEADabout 90% of the time.What are the
--smartflags? Is that a new feature? I'm on git 2.15.1 and don't see it in the man page, or when I try using them just to see if they work.For
git log --pretty, I spent a day reading the man page, and wound up with a helper, which is aliased togit log --pretty=format:'%Cgreen%h%Creset %Cblue%ad%Creset %s%C(yellow)%d%Creset %Cblue[%an]%Creset' --graph --date=short, it tends to be as terse asgit log --format=oneline, but also includes the useful author and branch info ofgit log --pretty.The
smartflags are not built in Git. That's just my 'aliases' for the commands.I also have a similar pattern of command repetition. I will try your script. Thanks!!
If you need any additional commands, please let me know! I'll try to make your life easier :)
Sure.. Thanks!
Hey! I've noticed that in this post you use "guys" as a reference to the entire community, which is not made up of only guys but a variety of community members.
I'm running an experiment and hope you'll participate. Would you consider changing "guys" to a more inclusive term? If you're open to that, please let me know when you've changed it and I'll delete this comment.
For more information and some alternate suggestions, see dev.to/seankilleen/a-quick-experim....
Thanks for considering!
Good job!
First of all thanks for your sharing
Second, if you are using z shell (zsh, if you are not using it, leaving everything and read about it now, it's amazing!) you can use the git plugin which is super cool
gcam - git commit -a -m
gp - git push
gl - git pull
gb - git branch
gst - git status
It saves me minutes (even hours) a day just using those aliases.
I do use zsh :)
Nice! I have been using bash aliases, I hope to learn scripting more.
Force command is always one key away and right next to the normal command, I wouldn't recommend that at all.
Speacially for you I've added confirmation when using the force commands (:
Can you please make a whole cheatsheet with all commands in pdf format?
Nice, thanks for sharing.
I have also created couple of bash helpers to streamline my git workflow: gyandeeps.com/git-helpers/
Love your script! Thank you so much for sharing ๐
Thank you! Make sure to have the most new version :)