Skip to content

Instantly share code, notes, and snippets.

@kaspim
Last active April 1, 2024 18:37
Show Gist options
  • Save kaspim/9998f13f4e593d4e3cc5dbc1c57d8fc4 to your computer and use it in GitHub Desktop.
Save kaspim/9998f13f4e593d4e3cc5dbc1c57d8fc4 to your computer and use it in GitHub Desktop.
Multiple Git repositories for same project and tip for Git command aliases
# 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