Category "git"

Why can't Git resolve remote branches when --single-branch is used?

So, we frequently optimize clones by effectively cloning with --single-branch. However, we are then unable to get additional branches later. What is the differe

ssh with 2 accounts in gitlab doesn't work

I'm trying to add 2 ssh keys in my pc to work with 2 gitlab accounts, I created 2 pair of keys and made this "config" file: # Compte Perso Host gitlab.com-perso

Always pull using HTTPS, push using SSH, using insteadOf?

I have a number of repositories using different Github URL formats. I would like all repositories to always fetch from Github over HTTPS, and to push over SSH.

Unknown revision or path not in the the working tree error for first push to empty remote

I have a local git repo with many commits. I created an empty repo in github (not initialized with any files). $ git remote add origin https://github.com/bar/f

How can I get git log to print the full hash and short stats of each commit on one line?

I would like to get this kind of output with git command line: bcfd649de8850e3bfc9584eb12be8fe136ca6985 3 files changed, 8 insertions(+), 1 deletion(-) I'm c

Pre-commit does not allow GPG code-signing?

We sign each commit with GPG2 for security purposes. Usually this involves a full-terminal-window "popup" asking you to enter a password after running git commi

! [rejected] master -> master (fetch first)

Is there a good way to explain how to resolve "! [rejected] master -> master (fetch first)'" in Git? When I use this command $ git push origin master it d

Jenkins groovy - How to retrieve tag from latest commit?

To fetch the latest commit from branchName, we run below code: treeMapData = git(branch: branchName, credentialsId: credential, url: "${gitLabServer}/${project

Create repository button disabled on GitHub

I am using macOS version 11.2.2 BigSur. I don't seem to be able to create a GitHub repository on the web (I am using safari). The button is greyed out or you sa

Git status fatal error: working tree directory

When trying to git status I get the following git status fatal: not a git repository: D:/path/path/path/.git/worktrees/horus_app_v100 the path worktrees/horus_a

Deleting git worktree bugs 'git status' and some other git commands

A few months ago (still in the beginning of learning git) I created a worktree without even knowing what it was. A new branch was created and now I realized tha

Stage only deleted files with git add

I have run git status and see several modified files and several deleted files. Is it possible to stage only deleted or only modified files?

How can I quickly check the value of ORIG_HEAD?

I would just like to echo the value of ORIG_HEAD at the command line -- how can I do this? To no avail I tried: $ echo $ORIG_HEAD and $ git echo $ORIG_HEAD

How can I quickly check the value of ORIG_HEAD?

I would just like to echo the value of ORIG_HEAD at the command line -- how can I do this? To no avail I tried: $ echo $ORIG_HEAD and $ git echo $ORIG_HEAD

git: 'remote-ttps' is not a git command

I am getting an error when I try to push my changes to remote branch, the complete error that I get is shown below - $ git push origin master git: 'remote-ttps

Adding private git repo via cPanel

I'm trying to add a private git repo onto cPanel but have ran into permission issues and not sure where I'm going wrong I have generated the SSH keys in cPanel

Changing the Git user inside Visual Studio Code

The user for my Git commits has changed, but I am not able to change that inside of Visual Studio Code. I changed the global settings in Git, but when I want to

Pushing to a different git repo

I have a repo called react. I cloned it into a different repo locally called different-repo. How can I then get different-repo to push remotely to different-r

Git pre-commit hooks only for a specific subfolder?

I currently have a single repo with two projects, each in their own subfolder: one in C# and one in Javascript. I want to have a pre-commit hook that will run j

fatal: bad boolean config value for 'core.autocrlf'

i am new to git and i am doing a test repository to see how it goes. First when i did git add i had a warning telling me that my file will be turned to clrf or