Quantcast
Channel: Git push existing repo to a new and different remote repo server? - Stack Overflow
Browsing all 20 articles
Browse latest View live

Answer by Dragomir Ivanov for Git push existing repo to a new and different...

Well, a lot of answers. Mine will be one of the shortest. You want to push to a new server, but also to keep all the history and branches:git clone --mirror https://git1.com/project/repo_name.gitcd...

View Article


Answer by ozanmut for Git push existing repo to a new and different remote...

If you want to duplicate your GitHub repository so that you have two identical repositories on GitHub:git clone [existing-github-repo-url]git remote add duplicate [new-github-repo-url]git push...

View Article

Answer by elliot for Git push existing repo to a new and different remote...

The way I've accomplished this is:Create a new repo on github (new-repo.git)cd old-repo/ on local machine and fetch all new changesgit push -u https://github.com/[username]/new-repo.git main -fClone...

View Article

Answer by gaborsch for Git push existing repo to a new and different remote...

First, create your repo on Github. Then change directory to the checked-out source repository - suppose you want to push the master branch. You need to execute 5 simple steps:git remote add origin2...

View Article

Image may be NSFW.
Clik here to view.

Answer by Chandraprakash for Git push existing repo to a new and different...

Visual studio 2022 and default git extension works flawlessly without even need for a single line of command.Step 1: Go to git settingsStep 2: Add new origin pointing to different repository in...

View Article


Answer by Denise Ignatova for Git push existing repo to a new and different...

This is has helped me to push my local project into a different repo on git git push https://github.com/yourusername/yourgithubproject.git master:master

View Article

Answer by Aguid for Git push existing repo to a new and different remote repo...

To push an existing repository from the command linegit remote add origin https://github.com/AyadiAkrem/teachandgo.gitgit branch -M maingit push -u origin main

View Article

Answer by Caro Pérez for Git push existing repo to a new and different remote...

Link a local repository to a different remote repository1- Delete all connection with the remote repository:Inside the project folder:git rm .git (Remove all data from local repository)git status (I...

View Article


Answer by upe for Git push existing repo to a new and different remote repo...

Here is a manual way to do git remote set-url origin [new repo URL]:Clone the repository: git clone <old remote>Create a GitHub repositoryOpen <repository>/.git/config$ git config -e[core]...

View Article


Answer by Abdel Ourimchi for Git push existing repo to a new and different...

Simply point the new repo by changing the GIT repo URL with this command:git remote set-url origin [new repo URL]Example: git remote set-url origin git@bitbucket.org:Batman/batmanRepoName.gitNow,...

View Article

Answer by Kamil Nękanowicz for Git push existing repo to a new and different...

If you have Existing Git repository:cd existing_repogit remote rename origin old-origingit remote add origin https://gitlab.com/newprojectgit push -u origin --allgit push -u origin --tags

View Article

Answer by Mobiletainment for Git push existing repo to a new and different...

I found a solution using set-url which is concise and fairly easy to understand:create a new repo at Githubcd into the existing repository on your local machine (if you haven't cloned it yet, then do...

View Article

Answer by vm345 for Git push existing repo to a new and different remote repo...

Try this How to move a full Git repositoryCreate a local repository in the temp-dir directory using:git clone temp-dirGo into the temp-dir directory.To see a list of the different branches in ORI...

View Article


Answer by itrascastro for Git push existing repo to a new and different...

I have had the same problem.In my case, since I have the original repository in my local machine, I have made a copy in a new folder without any hidden file (.git, .gitignore).Finally I have added the...

View Article

Answer by HairOfTheDog for Git push existing repo to a new and different...

Do you really want to simply push your local repository (with its local branches, etc.) to the new remote or do you really want to mirror the old remote (with all its branches, tags, etc) on the new...

View Article


Answer by kenorb for Git push existing repo to a new and different remote...

To push your existing repo into different, you need to:Clone the original repo first.git clone https://git.fedorahosted.org/cgit/rhq/rhq.gitPush the cloned sources to your new repository:cd rhqgit push...

View Article

Answer by mob for Git push existing repo to a new and different remote repo...

There is a deleted answer on this question that had a useful link: https://help.github.com/articles/duplicating-a-repositoryThe gist is0. create the new empty repository (say, on github)1. make a bare...

View Article


Answer by troelskn for Git push existing repo to a new and different remote...

Create a new repo at github.Clone the repo from fedorahosted to your local machine.git remote rename origin upstreamgit remote add origin URL_TO_GITHUB_REPOgit push origin masterNow you can work with...

View Article

Git push existing repo to a new and different remote repo server?

Say I have a repository on git.fedorahosted.org and I want to clone this into my account at github to have my own playground aside from the more "official" repo on fedorahosted.What would be the steps...

View Article

Answer by HuneycuttGIS for Git push existing repo to a new and different...

This was my answer to moving from Microsoft Team Foundation Server to Azure DevOps. It is PowerShell script. #RUN SCRIPT FROM FOLDER YOU WANT A NEW GIT PROJECT CREATED##1. Ask for URL that needs to be...

View Article
Browsing all 20 articles
Browse latest View live