961 questions
-1
votes
1
answer
53
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, ...
0
votes
0
answers
69
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 ...
0
votes
1
answer
58
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 ...
3
votes
1
answer
109
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, ...
1
vote
1
answer
86
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 ...
4
votes
1
answer
322
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-...
0
votes
0
answers
54
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,...
1
vote
0
answers
42
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.
...
-1
votes
1
answer
89
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....
0
votes
0
answers
42
views
having an error in git while pushing the project on git remote it says "fatal: protocol 'https' is not supported" [duplicate]
i first ran this command which worked perfectly fine
it shows already exist cause i ran the command twice
$ git remote add origin https://github.com/chaudharidhara2781/tatvasoft_internship
error: ...
0
votes
0
answers
28
views
Old branches on remote cannot be deleted [duplicate]
I have been extensively looking for this, but none of the online replies worked for me.
I have a git repo, on local I have only the master branch
% git branch
* master
however, a number of old ...
0
votes
2
answers
156
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, ...
-1
votes
1
answer
32
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 ...
0
votes
0
answers
84
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 ...
-1
votes
1
answer
78
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?