Category "git"

Git: cannot delete local branch

I was trying to track a remote branch with $ git checkout -b --track global/master, and git created a branch named "--track". Now, when I run $ git branch -D -

Merge local branch into remote branch other than master?

so I have a local branch A that doesn't exist yet in remote repo. And I have remote branch B in remote repo. How do I merge my local changes into the remote bra

Rename file with Git

I would like to rename file from README to README.md. What is the best practice to do that? I have only one repo called "change-z-index". I open and login like

Git and nasty "error: cannot lock existing info/refs fatal"

After cloning from remote git repository (at bettercodes) I made some changes, commited and tried to push: git push origin master Errors with: error: c

git pushes with wrong user from terminal

I have an issue with git and my terminal. Here's a gallery to show you my issue : http://imgur.com/a/6RrEY When I push commits from my terminal, git says I pu

SSH Key - Still asking for password and passphrase

I've been somewhat 'putting up' with Github always asking for my username and password when I clone a repository. I want to bypass this step because it is an a

How to delete a specific revision of a github gist?

I created a Gist on GitHub and I saw informations I don't want anyone to see. I updated the file since, but everybody can still access the old revision of the f

git ignore .env files not working

I have a laravel project. In the root directory are these 4 files: .env .env.example .env.local .env.staging I have a .gitignore file, and I'm listing the

How to delete a specific revision of a github gist?

I created a Gist on GitHub and I saw informations I don't want anyone to see. I updated the file since, but everybody can still access the old revision of the f

git:// through proxy

I'm behind a firewall that is blocking port 9418 (git) and am trying to install some tools that are explicitly doing a checkout of git://github.com/..., so I ca

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

How to automatically get a certain file(>1MB) from git

I want to grab a certain file from a private git repository daily under linux. I've got no problem with files under 1MB via Get content API with curl command as

Git's famous "ERROR: Permission to .git denied to user"

I have tried googling and read through https://help.github.com/en/articles/connecting-to-github-with-ssh and various, various guides. I am unable to git push -u

Git & redirections

I've noticed that when a git (html) project page such as this: https://github.com/fruux/sabre-dav is cloned, in this manner: git clone https://github.com/fr

Is there a way to cache https credentials for pushing commits?

I recently switched to synchronizing my repositories to https:// on GitHub (due to firewall issues), and it asks for a password every time. Is there a way to c

Throw away local commits in Git

Due to some bad cherry-picking, my local Git repository is currently five commits ahead of the origin, and not in a good state. I want to get rid of all these c

“Unregistered Git root detected” because parent directory of project is versioned by Git

I set up a PyCharm project /parent/project, that is managed by Mercurial at /parent/project/.hg. Independently of this project, /parent is managed by Git at /pa

Git refusing to merge unrelated histories on rebase

During git rebase origin/development the following error message is shown from Git: fatal: refusing to merge unrelated histories Error redoing merge 1234deadbe

bash script to check if the current git branch = "x"

I am very bad at shell scripting (with bash), I am looking for a way to check if the current git branch is "x", and abort the script if it is not "x". #!/

Push changes to remote repo without commit

Is it possible to push changes to a remote repository without commiting to the master branch? I use the remote repo just for deploying.