I think I'm going to start using rebase to get those clean commit histories though.
Ask HN: What is your Git commit/push flow?
41–50 of 201 posts
Re: Ask HN: What is your Git commit/push flow?
#42Where 5 is some number of commits (or origin tags)
Is your best best friend! Write great messages, squash things, or fix ups. Force push over your branch after you clean up… and send out a great PR!
Re: Ask HN: What is your Git commit/push flow?
#43My PRs are clean, each commit pass the CI and is its own thing.
Re: Ask HN: What is your Git commit/push flow?
#44All details regarding code and reasoning is on the issues and pull requests.
Re: Ask HN: What is your Git commit/push flow?
#45Re: Ask HN: What is your Git commit/push flow?
#46Here's how I address this problem. When I'm developing, but before I create a PR, I'll create a bunch of stream-of-consciousness commits. This is stuff like "Fix typo" or "Minor formatting changes" mixed in with actual functional changes. Right before I create the PR, or push up a shared branch, I do an interactive rebase (git rebase -i). This allows me to organize my commits. I can squash commits, amend commits, mov…
Re: Ask HN: What is your Git commit/push flow?
#47Basically you do the same workflow as you are doing now, just squash it to a single commit so that wherever is your last commit stays.
if needed you can go to your branch for history
https://stackoverflow.com/questions/5308816/how-can-i-merge-...
Re: Ask HN: What is your Git commit/push flow?
#48However, instead of rebasing, I often git reset to the beginning and recreate the commits from scratch, using partial file commits (or staged hunks). IDEs/editors like VS Code make it really easy to stage an individual part of a file for the commit. The CLI way (git add -p) has always been pretty confusing to me.
Re: Ask HN: What is your Git commit/push flow?
#49Here's how I address this problem. When I'm developing, but before I create a PR, I'll create a bunch of stream-of-consciousness commits. This is stuff like "Fix typo" or "Minor formatting changes" mixed in with actual functional changes. Right before I create the PR, or push up a shared branch, I do an interactive rebase (git rebase -i). This allows me to organize my commits. I can squash commits, amend commits, mov…
The only problem I have with this workflow in the command line is that I would like to be able to split changes to the same file across multiple commits. I think some GUI tools enable this, anyone know about it?
Re: Ask HN: What is your Git commit/push flow?
#50Here's how I address this problem. When I'm developing, but before I create a PR, I'll create a bunch of stream-of-consciousness commits. This is stuff like "Fix typo" or "Minor formatting changes" mixed in with actual functional changes. Right before I create the PR, or push up a shared branch, I do an interactive rebase (git rebase -i). This allows me to organize my commits. I can squash commits, amend commits, mov…
The only problem I have with this workflow in the command line is that I would like to be able to split changes to the same file across multiple commits. I think some GUI tools enable this, anyone know about it?