Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
113 views

I'm working on creating a template system with git, but git is being too clever (for my use case) by automatically 'unshallowing'. Let me try to explain. For context, the templating process starts by ...
Qubitz's user avatar
  • 45
0 votes
1 answer
92 views

Regarding How to unsquash a commit? I want to do the same - unsquash a commit. For the moment I had the same idea to simply delete the current commit and cherry-pick the squashed commits of it. ...
Steve Murdock's user avatar
0 votes
1 answer
92 views

Some commits were lost on the remote main branch because of force pushing. The ID of the lost commit was recovered by inspecting closed pull requests. The commit page has a warning "This commit ...
Igor Mukhin's user avatar
  • 15.5k
2 votes
1 answer
106 views

I have two local clones of the same remote repository (urlA): mirror/ – created with git clone --mirror urlA mirror dirB/ – created with git clone --reference-if-able ../mirror urlA dirB In dirB, ...
mastupristi's user avatar
  • 1,598
3 votes
1 answer
116 views

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, ...
Daniel Kaplan's user avatar
1 vote
1 answer
232 views

We have a couple YAML pipelines in Azure DevOps (cloud hosted). We've recently ported them from classic pipelines to YAML. The pipelines checkout code on a specified branch (main by default or the ...
Nerdtron's user avatar
  • 1,526
0 votes
1 answer
91 views

I'm processing a lot of Git repositories with software I wrote. The basic process is like this: Do git clone --no-checkout --filter=blob:none <url> Read interesting data from the repository and ...
user42723's user avatar
  • 660
2 votes
2 answers
63 views

My remote repository has hundreds of branches, so fetch is configured conservatively: % git config --get-all remote.origin.fetch +refs/heads/master:refs/remotes/origin/master refs/heads/release/2.5:...
Basilevs's user avatar
  • 24.6k
0 votes
1 answer
200 views

I recently started using GitHub to manage my code, using git commit -a -m command to commit changes to all files (-a) added with git add <filename>, along with a message (-m). After that, I run ...
Rui Miguel's user avatar
0 votes
2 answers
147 views

I’m working on optimizing my GitHub Actions pipeline. One of the steps involves retrieving the latest tag from my Git repository. Initially, I used the following commands to fetch the latest tag: git ...
Hyeon Ho Park's user avatar
0 votes
1 answer
87 views

I have successfully cloned a repository from a GitLab instance. The repository is called main. (It was named that long before most people started using main as a branch name. That's probably not ...
Mayor of the Plattenbaus's user avatar
0 votes
0 answers
27 views

I have a CI job which does a shallow checkout like this: git clone --filter=blob:none --no-checkout $REPO . git fetch origin $BRANCH git checkout -f $COMMIT I wanted to then archive that shallow copy ...
Sam Stern's user avatar
  • 25.2k
1 vote
0 answers
59 views

I am trying to move some files from one repository (source repository) to a new one (target repository), and I want to restore all the previous commits of those files into the target repository to ...
santacodes's user avatar
0 votes
0 answers
40 views

Given $localBranch = git branch --show-current $remote = git config branch.$localBranch.remote $remoteBranch = git config branch.$localBranch.merge $remoteTrackingBranch = $remote/$remoteBranch when ...
joseville's user avatar
  • 1,023
0 votes
1 answer
80 views

When I do git pull it fetches all remote branches to my local. And it saves them as remote-tracking branches (this is not the issue, though). I think it also fetched tags and maybe other things too. I ...
joseville's user avatar
  • 1,023
2 votes
1 answer
66 views

I have 2 remote branches, foo and bar. Neither foo nor bar exist locally. They appear in neither of the following git branch # local branches git branch -r # remote-tracking branches I did git fetch ...
joseville's user avatar
  • 1,023
0 votes
1 answer
115 views

I'm on branch master and do git log commit 9937b91089895fac45a39a3bda2935e19eb42554 (HEAD -> master, origin/master, origin/HEAD) ... git status prints On branch master Your branch is up to date ...
joseville's user avatar
  • 1,023
0 votes
1 answer
693 views

I am wondering why I have to git branch --set-upstream-to=origin/<branch> local-branch-name when doing git pull? Is there a way to keep the upstream the same as the current local branch of ...
caot's user avatar
  • 3,368
2 votes
0 answers
2k views

We are using Github to host our repo and the authentication mechanism is through an app. The git pull randomly fails with the following error. Emphasis on "randomly", it works 90% of the ...
Jay Joshi's user avatar
  • 1,602
0 votes
0 answers
171 views

When I execute repo sync to pull a large project, I will report a Bad packet length xxxxx error, and sometimes I will also report this error when using git clone. How should I handle this? Error info: ...
user25382962's user avatar
0 votes
3 answers
448 views

If I were to clone a repository, git automatically determines the name of the repository and clones it into that directory. As per the git clone documentation: <directory> The name of a new ...
nfl's user avatar
  • 75
0 votes
1 answer
108 views

I work in a very large monorepo, so by default the fetch configuration is constrained to avoid pulling down thousands of branches and slowing down git (i.e. fetch = +refs/heads/master:refs/remotes/...
mikemikemikemikemike's user avatar
0 votes
1 answer
75 views

According to this comment in object-file.c in the source tree of git, setting the ALTERNATE_DB_ENVIRONMENT environment variable should work instead of using the .git/objects/info/alternates file. The ...
nfl's user avatar
  • 75
0 votes
1 answer
2k views

I'm using NX in my CI with GitHub Actions and I checkout the repository using actions/checkout@v4. When I try to use nx affected:..., for example nx affected:lint or nx affected:test it fails with the ...
Francesco Borzi's user avatar
0 votes
1 answer
52 views

I created a branch. Let’s call it feat/feature1.0. My friend created a branch off of this branch. Let’s call it feat/feature1.1. My friend has committed and merged their changes into the original ...
Devvy's user avatar
  • 3
1 vote
0 answers
95 views

To fast-forward from origin I can do git merge --ff-only origin/BR if BR is checked out, otherwise git fetch . origin/BR:BR (or git fetch origin BR:BR to also update origin/BR). Using git merge, if BR ...
H.v.M.'s user avatar
  • 1,746
2 votes
0 answers
66 views

I want to synchronize certain subset of custom refs from origin to the local copy: git fetch --force --prune origin refs/x/1:refs/x/1 refs/x/3:refs/x/3 I need git fetch to delete local ref when the ...
xmedeko's user avatar
  • 7,948
0 votes
0 answers
23 views

I've been working for a while with git and multiple remote repos, cloned form a bare-repo. So, I could commit changes on one repo, push to the bare and fetch/merge into the other repo. On a new, small ...
phunsoft's user avatar
  • 2,744
1 vote
0 answers
105 views

I'm working with a large private Git repository with a single branch and I need to optimize the cloning process. My requirement is to later access the Git version history and the different versions of ...
Zeus's user avatar
  • 11
0 votes
1 answer
347 views

I really wanted to understand how git behaves and what's happening underneath the plans after I run a git fetch upstream HEAD on a clean local repository. Basically the steps were as follows: Create ...
rhuanpk's user avatar
  • 135
0 votes
1 answer
74 views

What is the difference between HEAD and HEAD:HEAD notation in git commands e.g.: git fetch origin HEAD:HEAD I can even understand what git fetch origin HEAD does, however, not using the other ...
rhuanpk's user avatar
  • 135
2 votes
0 answers
145 views

I ran git fetch --prune and I see: - [deleted] (none) -> origin/branch_name_here I can not tell from the branch name if it was an important reference. How do I find out where origin/...
Morrison's user avatar
1 vote
0 answers
52 views

So let's assume I have the same repository in two different local directories, besides origin. Let's call these localA/master and localB/master. Both of them synchronized with an origin/master. The ...
M I P A's user avatar
  • 95
0 votes
1 answer
63 views

I have a program that runs some scientific tests. I have written a git post-receive hook for the server that runs these tests: When it receives a commit, e.g. deadbeef..., run the program Commit the ...
Zaz's user avatar
  • 49.1k
-1 votes
1 answer
96 views

I am currently working on a project that involves forking a specific GitHub repository. In my forked version, I am required to incorporate a branch named windows into my project. The original main ...
Straw User's user avatar
0 votes
1 answer
890 views

I'm struggling to checkout a remote branch that I know exists, because it shows up with git ls-remote: $ git ls-remote 242d56fbd8d8af67df3157bd047252f5580e3df8 HEAD ...
Cornelius Roemer's user avatar
-1 votes
3 answers
2k views

While trying to make sense of the action actions/checkout@version, I came across this answer in which the following was stated to explain what happens when the same action is executed: The default ...
Mehdi Charife's user avatar
1 vote
1 answer
86 views

There are two developers working on branches dev1 and dev2, respectively, and usually every time one of them commits a change they do a PR into a common dev branch. Both developers have made a bunch ...
gkeenley's user avatar
  • 7,648
-3 votes
1 answer
914 views

I want every fetch and pull to get tags from origin, replacing local ones if they differ, and delete tags and origin/ branches that are not on origin, so I did this: git config --global fetch.tags ...
H.v.M.'s user avatar
  • 1,746
0 votes
1 answer
728 views

I accidentally committed a line of code that was not meant to be part of the commit. class Engine { x: X protected _events: Event // <-- this line was accidentally included y: Y the ...
Michael Moreno's user avatar
0 votes
0 answers
61 views

I am trying to run below command after shallow clone. //Run first - Passes git fetch --depth 100 --update-head-ok origin master:remotes/origin/master // Run next - Fails git fetch --depth 100 --...
Hacker's user avatar
  • 7,926
5 votes
1 answer
93 views

Git configuration branch.<name>.fetch is mentioned in the first git-fetch example1: Update the remote-tracking branches: $ git fetch origin The above command copies all branches from the remote ...
muzimuzhi Z's user avatar
2 votes
1 answer
382 views

I have a Git repo with one submodule and two commits that change the submodule's HEAD. If I check out one of the commits, and do a git submodule update, this succeeds without having to connect to a ...
Cactus's user avatar
  • 27.8k
0 votes
1 answer
338 views

I'm trying to investigate what happens if the network would fail during a git fetch command. I can't find any documentation that really goes into detail of the fetch command and digging into the git C ...
Johan Ahlqvist's user avatar
1 vote
3 answers
84 views

I thought you had to use fetch to get the latest version of a branch from the remote repository. If you do this as the person who wrote the article, don't you create a new feature branch from the &...
Jens's user avatar
  • 141
0 votes
2 answers
226 views

In a typical "regular" git clone, one ends up with .git/config as follows: [remote "origin"] url = [email protected]:orgname/reponame.git fetch = +refs/heads/*:refs/remotes/...
jakub.g's user avatar
  • 41.9k
1 vote
0 answers
198 views

This script iterates multiple Git repositories in order to get their latest commit SHA-1 per branch. These commands are launched inside an arbitrary .git directory, so Git commands can be invoked ...
Sovenique's user avatar
0 votes
0 answers
43 views

I wanted to get the tags that another contributor added to a github remote, so I ran git fetch --all --tags. The resulting fetch looked like this: $ git fetch --all --tags Fetching origin remote: ...
sigil's user avatar
  • 9,622
1 vote
1 answer
457 views

I have a project on gitHUB where I have two '.txt' file at .project level. I would use them for comparison a previus run to a new run to find out the difference. I use Jenkins to build the project, ...
Péter Sánta's user avatar
0 votes
2 answers
3k views

DISCLAIMER : There's already a post that already addresses this issue but sadly the author did not find any definite answer. Here's my issue : git pull shows "already-up-to-date" but they're ...
Zel's user avatar
  • 1

1
2 3 4 5
9