Skip to main content
Filter by
Sorted by
Tagged with
Best practices
1 vote
3 replies
71 views

I don't have access to the GPG key right now. How can I make commits and then sign them on another computer? I know about git rebase, but it's important to me that the dates in the GitHub repository ...
AsfhtgkDavid's user avatar
Advice
1 vote
13 replies
144 views

This is a question about the algorithm that Git uses and would ideally be answered by someone who has experience with the Git source code or who can find Git documentation that answers the question. ...
sasquires's user avatar
  • 385
1 vote
1 answer
126 views

I have a git hook commit-msg that checks the format of the commit message and rejects it if it is incorrect. The hook was working fine until recently (and was not modified recently). But now whenever ...
shim's user avatar
  • 10.3k
0 votes
0 answers
88 views

background My original project structure is like this: 20240720 # project root ├── tests ├── vnpy # submodule ├── vnpy_clickhouse # submodule ├── vnpy_datafeed # submodule └...
EvanHong's user avatar
-1 votes
2 answers
65 views

I recently did a migration of a project (Flutter, if it matters) from an old version of the framework it is using to a newer one. At one point in the migration branch, I deleted most of the source ...
Magnus's user avatar
  • 19.1k
1 vote
1 answer
67 views

This is a Java project using Eclipse and GitHub archiving -- has been running for several years. Something weird happened with Eclipse (MacOS). I went to Search the workspace for a text string "...
Pierre Bierre's user avatar
0 votes
4 answers
321 views

From Git - git-stash Documentation: A stash entry is represented as a commit whose tree records the state of the working directory, and its first parent is the commit at HEAD when the entry was ...
Ooker's user avatar
  • 3,400
-2 votes
1 answer
96 views

I am trying to setup a React project in my laptop , cloning from a repository. Using VS code . Any files changed or added is not displaying on the source control. However only when made some changes ...
Sz2013's user avatar
  • 358
1 vote
0 answers
120 views

I often watch git log --all --oneline --graph --decorate --colors to keep an eye on my rebases. Today, something rather unsettling is showing up: * b782b84 (HEAD -> dev, origin/dev) III * 22fe431 ...
iago-lito's user avatar
  • 3,256
0 votes
0 answers
33 views

I am using Visual Studio 2017 (version 15.9.70 recently updated), and I am facing an issue where unstaged changes are disappearing after editing and saving any file. I can see the changes briefly in ...
SKumar210's user avatar
0 votes
1 answer
176 views

gitlint is a handy tool and for example useful to limit the max line length of commit messages to 72 characters - as widely adopted standard across many projects. However, this rule also doesn't allow ...
phip1611's user avatar
  • 6,358
0 votes
2 answers
318 views

After I used all the commands git add . git commit -m "tracker project" git remote add origin https://github.com/pqd.git git branch -b git branch -a git branch -m main git branch main ...
Dat Phi's user avatar
  • 11
0 votes
1 answer
62 views

I have a feature branch ff which is based on main. I want to bring changes made by a commit HEAD abcde on top of ff. How can I do this?
pip's user avatar
  • 37
1 vote
0 answers
46 views

In order to let Bumpversion make a commit message like this: <date>|<bumped part>|<current version>|<message> (Where the <bumped part> means major, minor, or patch) I ...
fauve's user avatar
  • 321
3 votes
4 answers
132 views

Say I’ve been staging changes using git add, but then realize that there is some small change—consisting of a single hunk, let’s say—I should commit separately before committing the staged changes. ...
Olius's user avatar
  • 301
0 votes
3 answers
206 views

Few of my team members sometimes commit code without building project/solution which gives error to other team members when they get latest and build project. Example:- Error in code Still commit ...
Harsh Varde's user avatar
3 votes
1 answer
77 views

I have a Git repository with a submodule, and after creating a new commit in the submodule repository, I noticed that the commit ID of the submodule in the parent repository automatically updated when ...
StaY_Hungry's user avatar
23 votes
4 answers
19k views

When I attempt to commit in Git through R, I continuously get revoked access. The error is: gpg: Note: database_open 134217901 waiting for lock (held by 9857) .. I have pushed. I have pulled. I have ...
Will's user avatar
  • 246
0 votes
1 answer
58 views

Is there a way in Git to have a nice commit graph like this gives, git log --graph --oneline --all --decorate But with additional information, which would be retrieved from a custom executable? ...
Ondra Žižka's user avatar
1 vote
1 answer
508 views

I have an Azure Repo setup for my project. I am able to see the history of all commits from specific branch. I would like to download one of the commits as a patch. I found the option to cherry pick ...
fascynacja's user avatar
  • 3,206
0 votes
1 answer
147 views

I'm using Visual Studio 2022 Community. I have only used Source Control in Visual Studio once. I decided to use it again, following this tutorial. I created a simple solution that has nothing but ...
winscripter's user avatar
  • 1,180
-1 votes
1 answer
71 views

I have prepared the following pre-commit hook: #!/bin/sh # Run flake8 and mypy flake8 ./src FLAKE8_EXIT_CODE=$? mypy ./src MYPY_EXIT_CODE=$? # If either flake8 or mypy return an error, skip black ...
Barzi2001's user avatar
  • 1,866
0 votes
1 answer
136 views

I am using GitKraken and am currently trying to change from the feature branch to the develop branch, but an error saying conflicts prevent checkout. What should I do? It has currently been merged ...
정지윤's user avatar
0 votes
2 answers
1k views

I have used a wrong email for a project and need to change it all over the commits, and the solution from a post I found works great, but it resets the timestamp to the current time. I ran this ...
dreambold's user avatar
  • 3,110
0 votes
2 answers
2k views

I've created a branch and made some changes and attempted to commit and push. The commit was created, but the push failed because I hadn't selected the branch I should have been developing on and was ...
Mark Roworth's user avatar
0 votes
1 answer
440 views

I am learning the conventional commits. I am curious if we update some feature or a little of code patch, why don't we use "update:" in the conventional commits? I have read that there is ...
mrdoubleu's user avatar
0 votes
0 answers
29 views

I am looking for automated way to create commit message of specified format in Git. So that, when I type git commit, I would see Vim editor with already preformatted commit message, like this: [...
IvanS's user avatar
  • 11
0 votes
1 answer
406 views

I know that this is not normal practice and that my question is a "long shot". But is there a way force git to commit an unchanged file, so as to run githooks when the commit is pushed to ...
Geoff Alexander's user avatar
-1 votes
1 answer
68 views

I want to learn a new project, I need to constantly switch in the project's commit history so that I can view the code. First, I execute git switch --detach commit-hash to bring the project back to ...
JackFan's user avatar
  • 39
0 votes
0 answers
75 views

I want to revert a few commits I pushed from master to master. Total novice here. I have a Github repository where I have edited a bunch of codes in the past few weeks. I edited codes on the Github ...
shenaniganss's user avatar
2 votes
2 answers
898 views

Is there a way to 'remove' all commits prior to a specific commit all the way to the root commit? I figured git filter-repo does this kind of stuff? Although I wasn't sure if it will work when root ...
J...S's user avatar
  • 5,269
0 votes
0 answers
162 views

My employer requires that all pull requests contain a single commit. So I often have several inflight PRs that depend on each other. Given master -> branch A -> branch B, when I need to update A,...
asg0451's user avatar
  • 523
2 votes
1 answer
57 views

I am working on a local git repository project that is not linked or hosted on any remote repository. I actually have to submit this repo as a project but I accidentally committed a .class file on it. ...
Prickriti's user avatar
-1 votes
1 answer
125 views

I have been working on different branches and anytime task is ready I commit and create a pull request into the dev branch. Till now everything is okej, but is there a way to reverse or remove all ...
Anxheloo's user avatar
0 votes
0 answers
28 views

I'm trying to commit in IntelliJ. I'm using WSL2 Ubuntu and have set a commit template with: git config commit.template $HOME/.gitmessage.txt. When I commit in zsh, it works fine, but when I use the ...
Songsari's user avatar
-1 votes
1 answer
119 views

Using PHPStorm's interface, I committed five files and pushed to GitHub (I'm the only developer - I just use GitHub as a sort of backup). Then I realized a little more clean-up was needed on one of ...
OsakaWebbie's user avatar
0 votes
0 answers
50 views

Whenever I create a commit in git, the author name is set to y for some reason e.g. commit a9d8e57d15asdfb06865858fa6dsdsfd4ae42850d5d83 "Author: Y " Date: Mon Jun 3 14:13:27 2024 +0500 ...
ekhanad's user avatar
  • 193
0 votes
2 answers
111 views

This is very silly. The code base I am working on doesn't have a gitignore, so I have to manually undo some changes before I push. In the photo, I can undo certain changes. However, when it comes to ...
Dusty Shaw's user avatar
0 votes
1 answer
51 views

I have history in git like the following: <hash2> commit2 <hash1> commit1 <hash0> initial commit I do git rebase -i <hash0> and choose to edit (pick -> e) both commits (...
k1r1t0's user avatar
  • 867
-1 votes
1 answer
183 views

Is there an easy way in VS Code to commit only the file you are currently editing? I mean GUI equivalent for git commit pathspec where pathspec is the file currently being edited (and saved). man git-...
haba713's user avatar
  • 2,717
3 votes
1 answer
62 views

When doing a git rebase -i and, say, squashing two commits together, Git will bring up an editor with the commit messages in it for me to edit. Normally when I do a stand-alone git commit, I use the -...
cjs's user avatar
  • 27.9k
0 votes
1 answer
45 views

I have my project in visual studio code and I have published in github as well. But due to some faulty , my node modules got published as well in github. After performing rm -rf node modules ...
Karan's user avatar
  • 1
0 votes
0 answers
1k views

Recently I went to update my site in vscode. After making a few changes I saved the file, but realized all the changes were stuck in pending. After messing around some, the pending changes showed up ...
weekendpapa's user avatar
1 vote
0 answers
36 views

I am using commits to push/pull untested and unfinished code to a private, personal work-in-progress remote repo. That is, these commits serve only to synchronize across devices that I'm working on ...
shortwhile's user avatar
0 votes
1 answer
763 views

I have some orphaned commits accidentally committed to GitHub. Following this QA answer, I use git reflog expire --expire-unreachable=now --all to remove them from git rev-list --all. (I tried use git ...
An5Drama's user avatar
  • 762
-1 votes
1 answer
85 views

I am trying to commit a file called "index.html" using git but git is committing just a empty file without any insertions even after I make sure the file have changes, this is the terminal ...
Hassanein ali's user avatar
5 votes
2 answers
2k views

In this QA we learn how to use git commit -c or git commit -C to copy the commit metadata from a different commit. This includes author, date and message. What I would like to do is copy the author ...
donquixote's user avatar
  • 5,670
-1 votes
1 answer
722 views

I tried it in CMD/Gitbash/Vscode/Rubymine In vs code I get: IN ALL TERMINAL'S I GET: THIS IS THE GitLog ()even though I try to create the file manually it doesn't work any way: 10:27:56.174: [app-...
Adam's user avatar
  • 39
1 vote
1 answer
253 views

We are working with GitHub as repository and all the commits must to be signed. All team members have configured Git to sign the commits with their own SSH key. Everything is working fine, but the ...
ImiChau's user avatar
  • 81
-1 votes
2 answers
98 views

I'm not sure where to start. I'm a beginner at git and trying to get the lay of the land. Today I was working on a project and did not commit. My last commit was yesterday. I got on my PC and decided ...
Jayy's user avatar
  • 15

1
2 3 4 5
44