Skip to content

Instantly share code, notes, and snippets.

@appwebd
Created February 5, 2021 14:41
Show Gist options
  • Save appwebd/0fcaa9767724d292c2389e21a6f800a3 to your computer and use it in GitHub Desktop.
Save appwebd/0fcaa9767724d292c2389e21a6f800a3 to your computer and use it in GitHub Desktop.
[git existing git repository] Perform a git with existing git repository in console bash #bash #git #gitlab #github
#!/bin/bash
# author : Patricio Rojas Ortiz
# Purpose: Perform a git with existing git repository in console bash
# Usage : In the DCL git-existing-git-repository.sh clients/project1 folder-versioned
# Note : CHANGE CHANGE the name git@gitlab.local.lab with your git server name.
git remote rename origin old-origin
git remote add origin git@gitlab.local.lab:$1/$2.git
git push -u origin --all
git push -u origin --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment