960 questions
Score of 0
1 answer
186 views
How can I use git `remote.<group>' for optimized fetching across multiple repos?
I have a number projects where the git fork model differences, some are 'centralized' repo while others follow the 'fork' model. Some of the projects have multiple 'peer' forks attached I don't want ...
Score of -1
1 answer
75 views
How to merge two different git repos into one?
I was given access to a GitHub repository that doesn’t belong to me.
My goal: I want to clone this repo into my own new GitHub repository and then push it there.
I’ve already cloned the repo locally, ...
Score of 0
0 answers
81 views
Can't switch git accounts when pushin/pulling to 3rd-party repositories
I have 2 different Github accounts, one for college and one for personal stuff.
I'm trying to push some changes in a new branch to a friend's project repository, to which my personal account has write ...
Score of 0
1 answer
72 views
Can you easily spread Git remote url changes to all developers?
So this is fairly similar in nature to this old question regarding obtaining all remotes when cloning a repository.
For context, I am required to transfer about 30 projects from an old git forge to a ...
Score of 3
1 answer
152 views
What happened to git pull --all and how do I achieve the same effect?
Here's my directory structure:
root
|
\- GitRepoA
\- GitRepoB
\- GitRepoC
...
\- GitRepoN
I'm trying to effectively git pull master or git pull main in each of my git repos. Some of them use master, ...
Score of 1
1 answer
105 views
`git remote` lists 'origin' after removal
How is the following output possible? git remote is still showing 'origin', after it has been removed:
$ git remote -v
origin
$ git remote remove origin
error: No such remote: 'origin'
I can add ...
Score of 4
1 answer
624 views
Can I define an alias for a git remote?
I have a git remote named foobar:
[remote "foobar"]
url = [email protected]:joeuser/foobar.git
fetch = +refs/heads/*:refs/remotes/foobar/*
but I am also user to calling it foo-...
Score of 0
0 answers
96 views
git partial clone with multiple remotes
I am working with two repos (repo_a and repo_b) which are two forks of the same project. They are both very large in terms of files and history. I need to use a small set of branches from each of them,...
Score of 1
0 answers
56 views
How to fix "broken" repo with bad remote fetchref
If git has a bad fetchref configured for a remote -- "bad" meaning that the ref does not exist on the remote -- the remote becomes "broken" and no operations with it will work.
...
Score of -1
1 answer
107 views
Why does upstream have a blank "=" value in my local git repo and how do I remove it?
`guest@abc123 abc123 % git remote -v
origin [email protected]:abc123/repo.git (fetch)
origin git@github....
Score of 0
2 answers
182 views
How to change the remote branch that git status checks against?
My team moved servers for our Azure DevOps git repository.
How can I change the default remote that git status will compare against?
I have updated my remote origin to the correct server's url now, ...
Score of -1
1 answer
43 views
How to push the same changes (diff) to multiple remotes with diverging history?
I have two upstream repositories ftp05 and ftp06 that contain diverging git history. However, some files are shared between them. Now I made changes to a file which is the same for both repositories ...
Score of 0
0 answers
113 views
How to handle "fatal: bad object refs/heads/main 2"?
I executed this command on my perfectly working repository and today I see that my main branch has lost all of its logs and commits I had done.
❯ git log
fatal: your current branch 'main' does not ...
Score of -1
1 answer
93 views
Working with GitHub repository with no local git project [duplicate]
I want to merge a branch into main in a remote repository hosted on GitHub.
I don't want to clone the repository locally first.
How can I do this please?
Score of 0
0 answers
129 views
How to push a named local branch to a particular branch (of different name) in a remote repository
Is there a straightforward way to push a named local branch to a branch of a different name in a remote repository?
Currently, I have a complicated script which my students are supposed to run to do ...