Last active
April 1, 2024 18:37
-
-
Save kaspim/9998f13f4e593d4e3cc5dbc1c57d8fc4 to your computer and use it in GitHub Desktop.
Multiple Git repositories for same project and tip for Git command aliases
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
# Multiple Git repositories for same project and tip for Git command aliases | |
# Add second remote | |
git remote add origin git@gitlab.com:kaspim/test.git | |
git remote add github git@github.com:kaspim/test.git | |
# Examples of Git global aliases | |
git config --global alias.pushall '!git remote | xargs -L1 git push --all' | |
git config --global alias.pullall '!git remote | xargs -L1 git pull --all' | |
git config --global alias.fetchall '!git remote | xargs -L1 git fetch --all' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment