959 questions
-1
votes
1
answer
72
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
75
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
70
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
139
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
103
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
546
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
85
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
53
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
104
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
2
answers
170
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
41
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
108
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
91
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?
0
votes
0
answers
121
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 ...
-2
votes
1
answer
408
views
How to create github repository using access token via CLI
EveryOne.
I wanna create Github repository using access token via CLI
I wanna work on Command Prompt which has below functions.
Clone repository from github
Create repository on My github account
Add ...