Last active
September 24, 2025 19:38
-
-
Save asynchroza/7094aba3853a05220d55043dc352074c to your computer and use it in GitHub Desktop.
Revisions
-
asynchroza revised this gist
Sep 24, 2025 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,4 +14,10 @@ git rebase --onto <target> <current-base> <your-branch> ```bash git checkout <other-branch-name> -- path/to/your/folder ``` ## Show all commits that touched a specific file ```bash git log -L <start>,<end>:<file> # git log -L 40,43:app.js ``` -
asynchroza revised this gist
Mar 22, 2025 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,4 +8,10 @@ git branch -m <old-name> <new-name> ```bash git rebase --onto <target> <current-base> <your-branch> ``` ## Checkout (add) a file/folder from a different branch ```bash git checkout <other-branch-name> -- path/to/your/folder ``` -
asynchroza created this gist
Mar 22, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ ## Rename a branch ```bash git branch -m <old-name> <new-name> ``` ## Change base branch ```bash git rebase --onto <target> <current-base> <your-branch> ```