Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

copy code from one repo to another git

# checkout repository A
git checkout git@github.com:username/repoA.git
# cd into old repository
cd repoA
# change remote origin to the newely created repo (exemple repoB)
git remote set-url origin git@github.com:username/repoB.git
# push branch into repoB
git push origin <branch>
# cd into new repository and pull branch
git checkout origin <branch>
# finally don't forget to reset origin for repoA
git remote set-url origin git@github.com:username/repoA.git
Comment

how to copy git repository to another repository

--First get original repo.
$ git clone --bare https://gitsite.com/yourusername/original-repository.git
$ cd original-repository
$ git push --mirror https://gitsite.com/yourusername/new-repository.git
Comment

PREVIOUS NEXT
Code Example
Shell :: git push empty directories 
Shell :: remove empty pdf page 
Shell :: how to copy a file in linux 
Shell :: chmod recursive group read 
Shell :: git clone with long file names 
Shell :: pretty git branch graph print 
Shell :: linux send syslog message to remote server 
Shell :: change your default términal 
Shell :: Sending a Simple Email From Linux Terminal 
Shell :: add minutes to time in excel 
Shell :: nvm change version 
Shell :: install scala on mac 
Shell :: watchman installation 
Shell :: where are dns entries on linux 
Shell :: online c compiler with working fork 
Shell :: linux service .net app 
Shell :: kill proccess using serial port 
Shell :: push to docker hub 
Shell :: /usr/local/etc/httpd/httpd.conf 
Shell :: bash find term in files 
Shell :: sudo !! alias 
Shell :: running file pug 
Shell :: yarn change version 
Shell :: ubuntu bluetooth gets turned off everytime i reboot 
Shell :: create ssh key github 
Shell :: REMOTE HOST IDENTIFICATION HAS CHANGED! how to fix in ubuntu 
Shell :: debian upgrade python 
Shell :: code in terminal 
Shell :: zsh git aliases 
Shell :: ssh only key 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =