Last active
April 16, 2024 21:40
-
-
Save KHCode/7f9abd4d2afd7f3a00c58abfc8c3d0b0 to your computer and use it in GitHub Desktop.
Git Recipes
This file contains 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 characters
----------- Rebasing onto common branch when working with others ---------------------------------------- | |
git fetch origin develop:develop # instead of checkout develop, pull develop, checkout feature/... | |
git rebase develop | |
git push --force-with-lease | |
--------------------------------------------------------------------------------------------------------- | |
----------- Pulling down a single file from the remote repo --------------------------------------------- | |
git checkout origin/develop -- path/to/filename | |
# Use this a lot when I run a migration from another dev's recent merge and I need to clean up the schema | |
--------------------------------------------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment