GIT: How to have 2 local branch pushing to 2 different remote repositories so that you can merge code
Tech-Today

GIT: How to have 2 local branch pushing to 2 different remote repositories so that you can merge code


This tutorial will explain how to create 2 local branches with the same code base, each linked to different repository. The purpose is that you can share code between repositories. For example in a multi-module project, it's possible that 1 project will have different implementation depending on the client.

Assumptions:
1.) You have a github account.
2.) You already have 1 project pushed in your account.
3.) You have another empty github project.

Steps:
1.) Add the empty remote repository, name it clone.
2.) Create a local branch name clone -> select checkout new branch.
3.) Push to upstream so that the local branch will be added to the original repository.
4.) Configure clone branch set remote=clone.
5.) Double click clone local branch.
6.) Push to upstream to commit the changes to the empty repository. Go to github and check if the project is properly pushed.
7.) You can now switch between local branch and push to the necessary remote branch.
*Note: The 2 local branch can now be merge

What if you want to delete the remote repository and the clone branch in your original project?
1.) Delete local clone branch, first you mush double click the master branch so the clone branch is not active.
2.) In command prompt go to the first repository's directory and execute: git push origin --delete clone
3.) Delete remote branch




- Committing The Source Code On Github
Slack Discussion Repositories https://github.com/terawarehouse/terawarehouse-cataloghttps://github.com/terawarehouse/terawarehouse-reactTo commit our project in Github, make sure you already created a new Github repository and then: Get the repository...

- How To Initialize A Git Repository And Linked It To A Remote Repository Provider
For example we've just created a new project and want to push it to a remote repository. Here's what we need to do. Find out what is the repository url, you can see it at github. For example: https://github.com/czetsuya/JAX-RS-REST-Security.gitOpen...

- How To Invoke A Jenkins Build From Assembla On Git Push
This tutorial will try to configure a jenkins job to run when a git push is done on Assembla. This tutorial assumes that your server is running in Ubuntu 12.04.2. Requirements: You must have an assembla account with admin privilege.An external server...

- How To Deploy Jboss7.2 On Openshift
The following tutorial is a rough steps on how you can setup a custom server such as JBoss7.2 on OpenShift. Prerequisite, clone and checkout JBoss7.2 tag //clone the jboss repo >git clone https://github.com/jbossas/jboss-as.git //list the tags >git...

- How To Clone A Project From Github And Import In Eclipse
This page will teach us how to clone a project from GitHub to your local repository and import in eclipse. Prerequisites: 1.) Windows/Ubuntu with JDK6/7. 2.) eclipse (I'm using Juno) with egit, m2eclipse, m2e-egit plugin (from eclipse marketplace)....



Tech-Today








.