Git Product home page Git Product logo

git-multirepo's Introduction

Multi repo project

(https://nitinkc.github.io/git/multi-repo-push/)[https://nitinkc.github.io/git/multi-repo-push/]

Critical Features

  • Add Another Remote Repo (Bitbucket Repo with bb as remote repo name)
git remote add bb https://[email protected]/nitinc/git-tests-bb.git
  • Should be able to Push/pull from Bitbucket (bb) with git push bb <branch name>
git remote set-url --add --push bb https://[email protected]/nitinc/git-tests-bb.git
  • Should also be able to Push or Pull from at git pull (From at least one of the Repo)
git remote add origin https://github.com/nitinkc/git-tests.git
git remote set-url --add --push origin https://github.com/nitinkc/git-multiRepo.git
  • Should be able to push and pull to both repo simultaneously with one custom command git push both <branch_name>
# Add the remote with fetch URL
git remote add both https://github.com/nitinkc/git-multiRepo.git
git remote add both https://[email protected]/nitinc/git-tests-bb.git

# Add an additional URL for push
git remote set-url --add --push both https://github.com/nitinkc/git-multiRepo.git
git remote set-url --add --push both https://[email protected]/nitinc/git-tests-bb.git

if remote add for the second url gives error, add the entry manually into gitconfig. If not added, then also, the --push switch of remote set-url takes care of pushing the code into both the repo. the only difference will be in pulling the code. The code will be pulled on;y from the repo thats remote add first.

[remote "both"]
	url = https://github.com/nitinkc/git-multiRepo.git
	url = https://[email protected]/nitinc/git-tests-bb.git
	fetch = +refs/heads/*:refs/remotes/both/*
	pushurl = https://[email protected]/nitinc/git-tests-bb.git
	pushurl = https://github.com/nitinkc/git-multiRepo.git

Secondary features

git-multirepo's People

Contributors

nitinkc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.