newdevs:git:commands
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
newdevs:git:commands [2024/03/25 16:29] – [Squash Commits] tmccanna | newdevs:git:commands [2024/03/25 16:35] (current) – tmccanna | ||
---|---|---|---|
Line 35: | Line 35: | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | |
+ | * '' | ||
+ | | ||
* '' | * '' | ||
* '' | * '' | ||
Line 84: | Line 86: | ||
* fixup --> merges commits like squash does, but discards previous commit message | * fixup --> merges commits like squash does, but discards previous commit message | ||
- Use "git commit --amend" | - Use "git commit --amend" | ||
+ | - Push the changes up to your remote working directory as normal | ||
+ | * '' | ||
If you've already pushed multiple commits up to your remote working git repository, you can still combine them: | If you've already pushed multiple commits up to your remote working git repository, you can still combine them: | ||
- | - Verify that you are in your local branch. | + | - Follow the steps above, but when pushing, use "--force" |
- | - Type: '' | + | * '' |
- | * Alternatively if your branch is already built on current main, you can use: '' | + | |
- | | + | |
- | - Change the word "pick" in the second line to either " | + | |
- | - Push the commit again, and force it to overwrite the previous commits: | + | |
- | * '' | + | |
newdevs/git/commands.1711398585.txt.gz · Last modified: 2024/03/25 16:29 by tmccanna