Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [git-remote]

git-remote is a command used to manage the set of tracked remote repositories.

0
votes
0answers
15 views

Remote Repo name changed in Github, but not reflecting in Local Repo with Git fetch

Old Repo name : Old_repo_name New Repo name : new_repo_name Tried below commands git remote set-url origin <new_url_after_repo_change> git fetch --all git reset --hard origin/master Verified ...
17
votes
8answers
25k views

Git - error: RPC failed; result=22, HTTP code = 401 fatal: The remote end hung up unexpectedly

I am using ubuntu 11.10 machine. I have installed git of version 1.7.7.1. I am using git-cola to push and pull my code and I was able to commit and push my changes successfully. Now, I have changed ...
13910
votes
39answers
6.0m views

How do I delete a Git branch both locally and remotely?

I want to delete a branch both locally and on my remote project fork on GitHub. Failed Attempts to Delete Remote Branch $ git branch -d remotes/origin/bugfix error: branch 'remotes/origin/bugfix' ...
15
votes
3answers
12k views

Git submodule to track remote branch

I'm trying to use git submodules for aggregating 10+ repositories into one structure for easy development. It is supposed to clone the module and checkout a branch. Instead, the module is checked out ...
0
votes
1answer
35 views

How do you programmatically check if the local copy is behind the remote?

Currently I'm fetching the latest and then running git status and where i parse the output for Your branch is up to date with 'origin/master' but that feels really hacky. I've looked into using git ...
0
votes
1answer
25 views

Post-receive hook to /var/www/html and permissions

I created a wordpress staging remote on my Centos 7 VPS. Wordpress is installed in this directory /var/www/html and group/owner is the default apache:apache. Then I created a bare git repo on ...
-1
votes
1answer
34 views

Git pull from from other repo and push changes to current repo

I'm trying to pull contents from Repo1 and push those contents to RepoX. Below are the commands I've used so far, git remote add Repo1 [repo1 url] git pull Repo1 feature/branceName With the above ...
0
votes
1answer
47 views

Git : Could not read from remote repository

I'm trying to set a bare remote git repository on my ovh server. When I'm trying to push, I get the following error : fatal: '/git/repo.git' does not appear to be a git repository fatal: Could not ...
1
vote
3answers
41 views

Check if “remote” is indeed a git remote

Say I have a list of strings like so: remotes/origin/master remotes/origin origin/master origin how can I tell if the beginning of the string is a valid remote? For example, remotes/origin origin ...
399
votes
13answers
344k views

Remote origin already exists on 'git push' to a new repository

I have my project on GitHub at some location, git@github.com:myname/oldrep.git. Now I want to push all my code to a new repository at some other location, git@github.com:newname/newrep.git. I used ...
0
votes
1answer
16 views

Is there a difference between “remotes/origin/dev” and “origin/dev” in your local repo?

Is there a difference between "remotes/origin/dev" and "origin/dev" in your local repo? I seem to have witnessed some discrepancy, but haven't yet proven it to myself.
0
votes
0answers
23 views

Why would local “remotes/origin/master” be out of sync with the actual remote branch?

I am wondering, if you do this: git fetch origin master; and the above command succeeds - under what circumstances would the branch "remotes/origin/master" ever be out of sync with the actual remote ...
0
votes
1answer
100 views

How to use a git sub repository pushing to a private remote but pulling also from its original origin

I need to setup a repository like this: rep (pull & push from/to private remote) normal stuff sub-rep (pull from private remote & public remote and push to private remote) stuff in sub-rep ...
0
votes
1answer
6 views

How to recursively remove a broken git remote from all repos in a directory?

I have a folder full of old git repositories at arbitrary folder depths. Many of these repos were created when I was using an old git host that no longer exists. I need to find all of the local repos ...
3
votes
1answer
2k views

git remote prune origin does not delete the local branch even if its upstream remote branch is deleted

This is a common use-case for me, I clone a repository, checkout a branch, do some code changes, make multiple commits, then when its stable, i do a push to remote, eventually the branch gets merged ...
1
vote
1answer
23 views

git: Cannot see HEAD pointer of the remote (upstream) repo

I have configured 2 remote repos in git (develop)$ git remote -v origin git@gitlab:pkaramol/aproject.git (fetch) origin git@gitlab:pkaramol/aproject.git (push) upstream git@gitlab:...
2806
votes
19answers
1.8m views

How can I determine the URL that a local Git repository was originally cloned from?

I pulled a project from GitHub a few days ago. I've since discovered that there are several forks on GitHub, and I neglected to note which one I took originally. How can I determine which of those ...
1
vote
3answers
54 views

Set up Git to manage remote website

I've been trying to set up Git to manage my website, as explained per this tutorial and this one and this one and this one and this gist. To summarize what I've done: (in-depth explanations can be ...
16
votes
6answers
41k views

GitHub: Permission denied (publickey). fatal: Could not read from remote repository

I´m having trouble with GitHub. I´ve playing around with a remote repository of Git. When i now try to make any changes to the remote directory, i.e. git remote show origin or git push -u origin ...
0
votes
1answer
177 views

Critical situation in removing a local branch

I using the following command to remove a local branch with force delete option: $ git branch -D <branch_name> My question is, If I delete a local branch that had an upstream set and then do a ...
16
votes
1answer
20k views

Merge two remote branches in a Git repository

I have one remote repository with many branches. For example, my repository name is: http://navis.com/MyRepo.git Its branches are: development production (master) testing I would like to merge the ...
9
votes
5answers
123k views

How to connect to a remote Git repository?

I am working with a team and we want to use Git (Not with GitHub, we have a private remote machine). We were using SVN until now. We have a remote machine that works like an SVN repository. Now, we ...
1
vote
0answers
43 views

How to add a remote to a repository with lfs?

I'm trying to set up something like this: a bare repo on my HDD drive and a clone of it on my SSD with lfs installed. I'm doing it like this: First I set up a bare repo on my HDD: mkdir git_lfs_test....
0
votes
1answer
31 views

Linux Git remote to windows server 2016

I am facing an issue when doing on Linux Ubuntu git init git remote add origin username@domain@server_IP:e:/myRepo git fetch origin After entering my password, I have this message: fatal: ''e:/...
1
vote
2answers
50 views

Simple GIT workflow for small website development by one

I'm new to git, trying to get my head round it. So I'm developing a simple website locally and tracking it with git and want a remote repo on the public facing server to be the live site, to which I ...
3
votes
2answers
412 views

Git - Can't Push - “! [remote rejected] master -> master (Working directory has unstaged changes)”

I am trying to set up a "simple" git workflow for a Wordpress installation that has a local version, a staging version and a production version. All I want to do is make changes locally and push from ...
1
vote
2answers
153 views

How to create a remote Git repository?

Is it possible to create a new Git repository without creating it first on http://gitlab.com? My intention is to init a local repository, do some work, add files to the index, commit and finally push ...
1
vote
1answer
32 views

Process for syncing branches between git remotes

I am working on my own copy of a git repo called buildroot. I created a copy of the repo on the free bitbucket server. I am trying to periodically sync my private repo from the mainline buildroot repo....
73
votes
3answers
62k views

Why does Git tell me “No such remote 'origin'” when I try to push to origin?

I am very new to Git; I only recently created a GitHub account. I've just tried to push my very first repository (a sample project), but I'm getting the following error: No such remote 'origin' I ...
43
votes
6answers
49k views

Git push to live server

We have a website that has all its PHP/HTML/JS/CSS/etc files stored in a Git repository. We currently have 3 types of computers (or use cases) for the repository. Local developer: pull latest ...
25
votes
1answer
8k views

Track multiple remote branches

So let's say there are three developers: Alice, Bob, and Cecil. They decide to use Git without a central repo. They all set up remotes to each other, so that: Alice has remotes/bob/master Alice ...
18
votes
2answers
19k views

“Proper” way to pull git “production branch” to production server

I'm quite new to Git, and have read the Pro Git book @ http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging. My question is if what I'm doing today is the prefered way to work with ...
0
votes
0answers
28 views

git archive --remote command using GitPython

How can I use command (git archive --remote) using GitPython? As per the GitPython docs we can use git directly. I am doing something like: git = repo.git git.archive(remote= 'http://path') But ...
3
votes
1answer
174 views

Upload large files onto Github, error: remote disconnected

I am trying to upload files larger than 2GB onto Github. I tried both: using git commands and Github desktop client. I was trying to add files to github but I could not, I found that it was due to ...
0
votes
1answer
24 views

How to setup multiple tracking levels of branchs with git

I have a git local branch that tracked the remote svn trunk. I created a new development branch and set the local branch to track it. I want that the development branch will also track the svn/trunk ...
3
votes
3answers
2k views

Git/Bonobo - Add local repository to remote

I've just started using Git for version control on a local network. To allow multiple users to sync repositories I've also started using the Bonobo Git Sever package which works well. Up until now I'...
0
votes
0answers
42 views

Trying to connect to Git Repo on AWS EC2 instance using an SSH Key

Apologies in advance if this is not the correct place to ask this question. I'm trying to connect to git repositories hosted on an EC2 instance from the SourceTree Version 2.7.3 application I have ...
0
votes
1answer
43 views

Git push shows git comments

I have a project in remote git repository and when I push the code it is showing as following in the remote repository: <<<<<<< HEAD <?php /** * Front to the WordPress ...
0
votes
2answers
46 views

Git How to make a master repo that tracks two other repos

We are working on an app and use Github to hold and version our code. Currently, we are 2 people each working on a seprate repo (RepoA and RepoB). We decided that it would be best if we had 1 master ...
0
votes
1answer
23 views

How can I push new work to Github repository. Moved folders to a new folder without .git and made changes, code is available on Github [duplicate]

I changed computers and therefore copied and pasted a repository to the new system. However it does not have git folder. My code was uploaded on Github and I have made some new changes to the ...
0
votes
1answer
30 views

git - updating remotes - Do I need to provide the remotes name?

I'm writing a script to update several hundred repository remotes due to a url change for our internal code hosting. Some of these repositories have a different remote name (i.e. different than ...
3
votes
1answer
2k views

BitBucket - How to retrieve all repository urls from a server

Is there a way to retrieve ALL remote urls from a given BitBucket server. We have a lot of applications that are being moved from existing SCM to BitBucket. Our BB admins are creating the ...
0
votes
0answers
17 views

How to create git remote repository using script RHEL 7

I apologize if this question has been asked but I could not find any answers when I did a search. I am trying to create a GIT remote repository that is being hosted on our server (123.123.com) ...
1
vote
1answer
44 views

Different default remote for push and pull

Can I set it so that pull always pulls from upstream and push always pushes to origin unless specified otherwise. P.S. - I don't want a different push and pull (set-url) for a specific remote but ...
3
votes
2answers
36 views

Different default remote for pull and push, while allowing manually specifying one

I have a local Git repository that has two remotes. origin is a fork of upstream. I work on master. I would like to achieve this: git pull is equivalent to git pull upstream master git push is ...
48
votes
7answers
21k views

List all local branches without a remote

Problem: I want a way of deleting all the local branches I have that do not have a remote. It's easy enough to pipe the names of the branches into a git branch -D {branch_name}, but how do I get that ...
2
votes
4answers
51 views

Is one git remote aware of another?

I have a local repository, to which I have associated two remotes (via git remote add...). I regularly push to both remotes. Are the two remotes linked or aware of each other in any way? In case it's ...
1
vote
0answers
18 views

update files in folder on a network drive when i do a git push

I'm hoping someone is able to shed some light on the voodooo that is auto updating files on a network drive. On my local drive (c:/dev/project) i have a git repo which has a remote on bitbucket, the ...
0
votes
0answers
16 views

Switching heroku remote to another branch

Context: I had a nice clean way of managing my staging and production environment until I ruined the develop branch. This is what it looked like: staging environment: branch name: develop heroku ...
20
votes
2answers
9k views

EGit: Pruning Remote Tracking Branches that have been Deleted on the Remote Repo

I'm using EGit (for Eclipse) with a team of devs. We have been creating a lot of feature and fix branches for new work, and then merging them into our release branches when they are completed. Right ...