How do I delete a Git branch locally and remotely?

I want to delete a branch both locally and remotely. Failed Attempts to Delete a Remote Branch $ git branch -d remotes/origin/bugfix error: branch 'remotes/origin/bugfix' not found. $ git branch...

How can I push a local Git branch to a remote with a different name easily?

I've been wondering if there's an easy way to push and pull a local branch with a remote branch with a different name without always specifying both names. For example: $ git clone myrepo.git $...

How to pull remote branch from somebody else's repo

I've got a project hosted on GitHub which somebody has forked. On their fork, they've created a new branch "foo" and made some changes. How do I pull their "foo" into a new branch also named...

Git: How to revert 2 files that are stubbornly stuck at "Changed but not committed"?

I have a repo that has two files that supposedly I changed locally. So I'm stuck with this: $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what...

How do I rename a local Git branch?

I don't want to rename a remote branch, as described in https://stackoverflow.com/questions/1526794/rename-master-branch-for-both-local-and-remote-git-repositories?answertab=votes#tab-top. How can...

Remove tracking branches no longer on remote

Is there a simple way to delete all tracking branches whose remote equivalent no longer exists? Example: Branches (local and...

Git Push ERROR: Repository not found

I am having a very strange problem with git and github. When I try and push, I am getting: git push -u origin master ERROR: Repository not found. fatal: The remote end hung up unexpectedly I...

How to git bundle a complete repo

I need to transfer a complete repo to a new non-networked machine, preferable as a single file entity. The git bundle allows a git fetch, git pull style operation in a sneakernet environment but...

GitHub Error Message - Permission denied (publickey)

Anybody seen this error and know what to do? I'm using the terminal, I'm in the root, the GitHub repository exists and I don't know what to do now. > git push -u origin master Permission denied...

Git rename from index.lock to index failed

Using the GitHub Windows client I did a sync to pull remote changes to my local machine, but before finishing the sync, I ran out of disk space and the sync failed. Now I seem to have a bunch of...

Changing the Git remote 'push to' default

I want to change the Git default remote branch destination so I could just git push Instead of: git push upstream Currently this is set to the origin remote and I want to set it to a different...

git error: failed to push some refs to remote

For some reason, I can't push now, whereas I could do it yesterday. Maybe I messed up with configs or something. This is what happens: When I use the git push origin master What my working...

How can I clone a private GitLab repository?

When I do this: git clone https://example.com/root/test.git I am getting this error: fatal: HTTP request failed When I use SSH: git clone username [email protected]:root/test.git I am getting...

Docker Debian apt Error Reading from Server

It would seem that apt-get is having issues connecting with the repository servers. I suppose it is likely compatibility issues, as mentioned here, however the proposed solution of apt-get clean...

"libcrypto.so.1.0.0: version 'OPENSSL_1.0.1' not found " during shell_exec

I'm running into a bit of a weird issue in PHP using shell_exec to run git commands. This is a brand new image of Ubuntu 16.x LTS with only a copy of Lampp installed and the git packages. Within a...

How to solve git merge error "Swap file .MERGE_MSG.swp already exists"

When I pull: E325: ATTENTION Found a swap file by the name "~/Documents/Sites/recipegenerator/.git/.MERGE_MSG.swp" owned by: username dated: Wed Dec 14 12:28:45 2016 file...

Github remote permission denied

I'm trying to upload my repo on github and go through all the steps upto: git push -u origin master at that point it gives me the following error: remote: Permission to samrao2/manager-4.git...

Why is Jenkins suddenly unable to delete a workspace

We have a Jenkins server which has successfully built our code over 200 times - until a couple of days ago. We are now getting an error to indicate that Jenkins was unable to delete the workspace...

Jenkins fails to clean workspace before build

Trying to setup Jenkins running inside docker container and also being able to run containers there. When I run first build all works great but when I run second one I am hitting following...

Git SSH public key authentication failed with git on Azure DevOps

I am trying to push a git repo from PowerShell into an Azure DevOps repo, and I keep getting different auth errors when trying to push it. I am hoping somebody can shed some light on what I check,...

How to set default remote in git?

I have multiple remotes in my git repository. If I execute git pull, then it asks for the password of one of my colleagues. How can I change the remote to black?

[email protected]: Permission denied (publickey)

I created a new remote repository and tried to use git push -u origin master command to push my local files into the new repository the first time after I add it and commit it. However, it pops up...

why ssh connection timed out in vscode?

I installed git instead of openssl to use Remote-SSH in VSCode.However,after I completed the config document and tried to connect to the remote host.I failed. The error info is showed in the...

error: failed to push some refs to 'https://github.com/

this is my repository https://github.com/kiotie32/artbit-text.git when I do $ git push -u origin master remote: Repository not found. fatal: repository...

jenkins does not find git on mac

Jenkins building a simple hello world app fails with this command Caused by: hudson.plugins.git.GitException: Command "git init /Users/jenkins/workspace/helloworld" returned status code 1: stdout:...

Upload large amount of files to github

I've seen numerous guides on how to push large files to github, but not how to push a large amount of files. I have a folder on my desktop that has 600 MB worth of text files that I need to push...

Authentication failed when pushing to a repository on GitHub (from GitHub Desktop and command line)

I am using GitHub Desktop v2.5.7 and Git v2.29.1 on Windows 10 64 bit. My GitHub account has 2FA enabled. I can clone repositories from GitHub using the GitHub Desktop or command line I have...

Cannot git push

I'm running into an issue when I git push (Via CLI or Github Desktop) on Windows. C:\code\MHPanel>git push origin develop error: src refspec develop does not match any error: failed to push some...

Support for password authentication was removed. Please use a personal access token instead

I got this error on my console when I tried to use git pull: remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please...

refusing to allow a Personal Access Token to create or update workflow

Today when I added a workflow and push the code to GitHub remote repo, shows this error: refusing to allow a Personal Access Token to create or update workflow This is the full error...