FAQ Database Discussion Community


How to change a connection to Github from SSH to HTTPS?

git,github,ssh,https,git-remote
I created my first repository in Github yesterday. When making the connection I used SSH instead of https, so I went through a little painful SSH key creation and connection process. At some point I got stuck and the connection failed. I wondered at that moment how I could revert...

How can I retrieve git remote branches?

git,version-control,git-branch,git-remote,git-checkout
I'm clearly missing something since I am unable to fetch the remote branch I need on the server from the git repo I've been working with locally. On my local dev environment I run git remote -v and it gives me: origin [email protected]:the_repo (fetch) origin [email protected]:the_repo (push) I run git...

“git remote show origin”: why all branches show “tracked” even when some aren't?

git,git-branch,git-remote,git-track
Why does "git remote show origin" list remote branches as "tracked" even when those branches are not linked to a local branch for pull/push? Does "tracked" mean something else in this context? I thought that was the whole meaning of "tracked": git docs on branch tracking. 1) clone a repo...

Git merge two remote branches in one repository

git,merge,git-branch,git-remote
I have one remote repository with many branches.For example My repo name is http://navis.com/MyRepo.git There has many branches, development production(master) testing I would like to merge development branch to production branch (master). Can anybody share git command for merging two remote branches?...

Git heads messed up?

git,git-push,git-remote
Under branch dev, when I run git status I get On branch dev Your branch is up-to-date with 'hub/dev'. nothing to commit, working directory clean When I run git remote show hub I get * remote hub Fetch URL: ssh://[email protected]/home/user/private/repos/user_hub.git Push URL: ssh://[email protected]/home/user/private/repos/user_hub.git HEAD branch: master Remote branches: dev tracked...

Join old and new repo, created by copying files (not cloning), preserving commit history

git,git-branch,git-remote
To simplify things I have the following structure in git old_repo for "subpath": subpath/old_commit_1 subpath/old_commit_2 subpath/old_commit_latest I decided to move to a new_repo and just copied the latest version of "subpath" (from old_commit_latest) into it without any commit history. So the new_repo now has "subpath" and a bunch of new...

Git merge: why I saw some are “Merge branch 'master' of github.com:foo/bar”, and some are “Merge remote-tracking branch 'origin/master'”?

git,git-merge,git-remote
Git merge: why I saw some are "Merge branch 'master' of github.com:foo/bar", and some are "Merge remote-tracking branch 'origin/master'"? In my understanding, "merge" always merge remote tracking branch....

Git push in Jenkins with multiple repos yields repository not found errors

git,jenkins,git-push,git-remote
I've configured a Jenkins job with multiple repositories in the "Source Code Management" section, with each one getting a "custom" origin name. The use case is that I need to pull a checksum value from the first repo, and then use that to update a file in the second repo...

How to create a new 'Local' remote repository for an existing project with Git

git,repository,git-remote
I have just started a new git project that is so far stored on my local Mac. Now that the project has a few revisions checked into it, I would like to push these changes to a network location (I have a Time Capsule in my local network, where I...

How do I add a branch from a new remote to an existing Git project?

git,git-remote
I have an existing local Git repository and would like to add a branch corresponding to a branch on an unrelated remote Git repo (ideally without the full history+), from which I may occasionally pull updates. I've been struggling with how to accomplish this and have come up with git...

git: how to restore remote master?

git,master,git-remote
Locally I was working on the master. Then I accidentally did git push origin master instead of git push origin develop:master What is the best way to restore the master on remote? ...

How to list remote branch without web request?

git,branch,git-remote
i just want to list my local remote branches. but when i run git remote show origin, it needs to take a request to the server. How can i do ?

Having git pull and push to different default remotes based on the branch

git,github,git-branch,git-push,git-remote
Im trying to figure out how to setup git where I can pull/push from/to one remote and it by default pulls/pushes it into its own local branch. This remote won't be the origin remote and Id like to merge the branch occasionally to the master branch which will be pushed/pulled...

git server refusing password or ssh-key

git,ssh,git-remote
I currently have a git server I user at home set up for multi-user private repos like below /opt/git /opt/git/me/..all my projects here /opt/git/someotheruser/...all his/her projects here I have the git-shell in-place and now after a few months am trying to get access to my repo from a different box...

git branch on another server

git,git-branch,git-remote
I am working with a customer who provided git branch access to get the latest src code. I've to continue working with that src code. But my company won't allow me to commit the src code directly to their branch. And so, my company provided with our own repository account...

Github Strategy/Remote Setup for Open Source Project

git,github,git-remote
I have gotten a Github open source project at a good place to share with others (we'll call it Repo A). I'd like to copy the code into a new repo (white label it) called Repo B. Recap Repo A: custom copy of the code for a non-profit (the existing...

git pull command output message meaning into which branch

git,git-branch,git-pull,git-remote
Say there is a remote branch br1 checkout on the remote repo, and the master branch on a local repo. Command 1: If I do a "git pull origin br1:br1" it pulls remote br1 into local br1, and shows: 9188a5d..97d4825 br1 -> br1 9188a5d..97d4825 br1 -> origin/br1 command 2: If...

Rename git remote name to “upstream”

windows,git,shell,git-remote,git-fork
I have a tiny problem with my git setup. I am working with forked repositories quite often. To fork them, I use the button on GitHub. After that, the command git remote -v shows me "origin" and "original-username". "original-username" is now the upstream branch where I can pull changes from...