Skip to content

Commit

Permalink
(feat) Updated the git command blog.
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLeungYL committed Nov 27, 2024
1 parent 1f93626 commit 7a44756
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion content/post/Useful_Git_Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,14 @@ It is OK to repeatedly merge other branches to one branch. For example, we can r

`git clone --filter=blob:none`: Download the git commit tree and the latest blob, but skipped the history blob at the time. Git will fetch for blob if you ask for history commit data.

If you are working with super large monorepo, you can use `scalar` command, an alternative `git` command that wraps up some `git` commands optimized for large repos.
If you are working with super large monorepo, you can use `scalar` command, an alternative `git` command that wraps up some `git` commands optimized for large repos.

If you have a series of commits, and you want to patch something up in the early commit, you can use:

```bash
git commit -a --fixup=<old_commit_hash>
# here, it will create a new patch commit on top of the head.
git rebase --autosquash main
# apply the patch commit to the old commit, and then rebase the commit series.
# it runs rebase in the background, if it encounters something that cannot fix, that it will prompt you for rebasing.
```

0 comments on commit 7a44756

Please sign in to comment.