Questions tagged [git-commit]
git-commit - Record changes to the repository along with a log message.
2,118
questions
0
votes
0
answers
14
views
Git contributions not showing my commits only the create repo and pull requests on GitHub
I went through your following article https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/ for contribution not being shown on my profile.
To say the least.
I am ...
2
votes
1
answer
28
views
Edit author/committer of multiple commits based on commit message
I am looking to edit the author/committer of several commits whose message is prefixed with [TEST].
I know that you can edit the authors with environment variables but I can't find it by searching ...
0
votes
0
answers
38
views
How to reproduce this change in pull request history?
I would like to know all the possible ways a PR could have such a history. Is it possible achieve it without git commit --amend --author="xxx"?
I had some work done on the branches and when ...
0
votes
0
answers
19
views
Can squashing a merge commit cause issues when merging to main branch?
Created a feature branch from develop.
Added few commits and pushed to remote.
Merged develop branch into my feature branch to get latest changes and pushed to remote.
Added few more commits and ...
1
vote
1
answer
30
views
How does Github identify commits affecting a file path during a merge commit?
I've read in other posts that a commit with parents of size 2 usually means a merge commit. This allows me to filter out basically all of those merge commits that say merge pull request or merge ...
-1
votes
1
answer
59
views
Git rebase --onto rebased branch
I need some help on how to use git rebase --onto to rebase a working branch effectively. I tried to follow this doc https://womanonrails.com/git-rebase-onto
Context
I branched branch-B from branch-A. ...
0
votes
1
answer
30
views
Delete sensitive string from all Git commits
I have internal github in our organization. There is a particular git repo where I need to replace a sensitive string from all commits. There are around 2000 commits and the sensitive string is there ...
-2
votes
1
answer
54
views
How to modify the content of previous commits?
I'm modifying the content of a past commit called "commit2", with the following steps:
#1 checkout the commit we want to modify
git checkout ad4fe51
#2 amend the commit with ...
0
votes
1
answer
40
views
How to revert git branch with all commits?
I was deleted my barnch form Github Branch Page.
What i did before deleted my branch?
Resetup my ubuntu os, git SSH keys, downloaded repo zip file.
Extract the zip file.Then added remote url.
Then ...
0
votes
0
answers
37
views
Git Commit Fatal Error: fsync error on '.git/objects/...': Bad file descriptor
Get error when commit changes:
Git failed with a fatal error.
Git failed with a fatal error.
fatal: fsync error on '.git/objects/92/tmp_obj_defDi8': Bad file descriptor
But only in a specific ...
0
votes
0
answers
27
views
After merging a repo into another repo, git push fails due to bad committer data (Complaining about commits by other users from repo A)
I merged the master branch of repo A into repo B feature branch locally.
Master Branch of Repo A has 1000's of commits by many different committers.
I followed the general merge guidances like this ...
0
votes
1
answer
27
views
Git, tortoisegit. How to run my cmd file after every commit
I use tortoisegit. How can I run my cmd file after commit on some of my repositories . I mean use an event on commit on repository?. I do all of my meaningful commits only by tortoisegit and i need it ...
1
vote
0
answers
48
views
Git commit. Restrict renaming
I have a folder in my repository where i have only create or delete files or subfolders, but never rename them. But git often interprets in one commit deleting a file and creating another file like ...
-1
votes
0
answers
16
views
How to remove a file from commit not yet pushed [duplicate]
Although it's not my latest commit, I haven't pushed it. I want to remove a specific file of data because its too big, and I have super low upload speeds (it will take 2 full days to push). This is ...
-1
votes
1
answer
44
views
Does adding the 'signingkey' and setting 'gpgsign' to 'true' in the configuration enable GPG signing of commits?
I've gone ahead and added the 'signingkey' and set 'gpgsign' to 'true' in the .gitconfig file. Now, I'd like to create a concise git commit message summarizing this change. However, I'm uncertain if '...
3
votes
1
answer
64
views
How to configure Git to remove certain lines before commit, for both local files and commit?
Because of a tool that I use, certain comment lines keeps being added to my code.
// Added by blahblah
Since I can't turn off this behavior, I want to configure Git to automatically remove that ...
0
votes
1
answer
28
views
Keep Untracked File in Github
I have a github repo which is being used by many users, and assuming more people will join as the project grows. As everyone clones the project i want it to be seamless.
It is a python project, and i ...
1
vote
1
answer
59
views
"the input device is not a TTY" error on git commit in WSL
I am setting up a new development environment which, on the surface, is the same as the environment I have on another computer:
Windows 10
WSL running AmazonLinux2
Windows terminal
git version 2.40.1
...
0
votes
0
answers
26
views
commit-msg hook gives "[[: not found" error
My .git/hooks/commit-msg file looks like
#!/bin/sh
COMMIT_MSG_FILE=$1
comm_msg=$(head -l $COMMIT_MSG_FILE)
if [[ $comm_msg =~ ^TASKID-[\d]+ ]]; then
exit 0
else
echo "Commit message must ...
-1
votes
1
answer
30
views
git pull origin master not wokring [duplicate]
Whenever i try to push my git that is when i use "git push -u origin master" this command
I get "error: src refspec master does not match any
error: failed to push some refs to 'https://...
0
votes
0
answers
48
views
Getting an error on NextJS app when trying to push to gitHub. I added a long video to my assets, but then deleted it and I'm still getting the error
This is my error:
Compressing objects: 100% (19/19), done.
Writing objects: 100% (19/19), 203.40 MiB | 4.76 MiB/s, done.
Total 19 (delta 15), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas:...
1
vote
1
answer
51
views
error when commit, first time to push at github
Initially, I wanted to delete 1 file, so I immediately deleted it via VS Code without git rm, because I didn't know how to delete it. After I committed it, suddenly this appeared.
I don't know how is ...
0
votes
0
answers
35
views
Prevent commits without PR but allow admins to merge without approval
As the title says, how can I force all commits to require a Pull Request (for admins and non-admins) with 1 approval required (for non-admins only)?
See image below:
0
votes
0
answers
23
views
How to automatically commit & push git changes using vs code extensions/source control?
I want to automatically message commit(or some way to commit with no message or even just any character it doesnt matter) & commit & push automatically in vscode git source control feature and ...
0
votes
0
answers
34
views
How to make Git automatically retain committer date for `git commit --amend`?
I am aware of Git picking up the GIT_COMMITTER_DATE environment variable, but for every amending commit, I have to manually prepend GIT_COMMITTER_DATE="$(git log -1 --pretty=tformat:%cD HEAD)&...
2
votes
3
answers
158
views
Change git commit message without interactive rebase
I know two methods to change a commit message in git.
The first is git amend, which only works for the latest commit. Since I want to be able to change older commit messages directly, this is not what ...
0
votes
0
answers
24
views
Delete a specific file from past commit from a branch
I've read many solutions but I am looking for the method like this:
I have the commits: A, B, C, D, E.... W.
I'd like to delete a specific file: filename.json from the commit H from the branch not ...
0
votes
0
answers
11
views
Gitlab not ordering repos by commit date
We've started migrating repos from an old gogs instance to gitlab web. However, after mirroring the projects (by using git clone --mirror), gitlab orders the projects by creation date, rather than ...
0
votes
0
answers
18
views
Why commits orders are different from GitHub API and webpage?
I am conducting commit history analysis experiment, and the goal is by searching the existence of certain files/dirs in each commit (by using binary search algorithm) to find a special commit that ...
0
votes
1
answer
79
views
Unable to verify commits with gpg - Bitcoin alerts for Nostr
I'm trying to run this project on my nostr account https://github.com/yukibtc/bitcoin-alerts with my Windows machine.
As I clone the repo and run the command
gpg --keyserver hkps://keys.openpgp.org --...
1
vote
1
answer
189
views
Customize commitlint with conventional commit + JIRA Ticket
I am using commit lint and I want to use conventional commits but i want to include a Jira Ticket.
Example TEST-23: fix: my body
0
votes
0
answers
24
views
GitHub: How can I mark a task in a issue with commit message?
I know how to close an issue with a confirmation message, but I would like to know if it is possible to verify a task in an issue.
I don't close a issue, just a task #3
´´´
(Open) 2 of 5 tasks
Issue ...
1
vote
1
answer
33
views
How do I make a branch on Github, make sure it is created, and push to it?
I'm writing a script to automate initializing, adding, and pushing projects to GitHub to teach myself some scripting. I get a few errors, but one of them seems to be stopping the script from working:
...
0
votes
0
answers
44
views
Remove file from existing commit in Sublime Merge
How to remove specific file from existing commit (the last commit in a branch) in Sublime Merge?
1
vote
1
answer
27
views
Replace several information during git commit using filter
In my source code (".ino" file), I have saved my Wifi credentials. Using git commit, my personal Wifi information should be replaced by general information. Therefore I'm using the "...
0
votes
0
answers
15
views
Upon git commit I see error `git-seekret died of signal 9`
Any time I run git commit I get the following error:
error: git-seekret died of signal 9
This error occurs no matter what changes I am committing, small or large. It happens on all repos on my ...
4
votes
1
answer
61
views
Inject additional hints into `COMMIT_EDITMSG` during `git-commit`
The problem
When I run git commit without -m, git launches a commit message editor with some hints, something like this:
# Please enter the commit message for your changes. Lines starting
# with '#' ...
0
votes
0
answers
20
views
Selecting proper commit type
I have used the semantic commits style guide to write my options for commit types. These options are made specifically for the VSCode Git Commid Message Extension. All of them make sense in what they ...
0
votes
1
answer
26
views
Someone committed on my github repository after forking it
A user forked one of my github repositories and started committing on its fork. Nevertheless, some of his commits were pushed to my repository despite him not being among the collaborators of the repo....
0
votes
0
answers
11
views
Commits not appearing in GitHub commit history or code (it is successfully committed locally on my desktop)
successfully committed locally ](https://i.stack.imgur.com/RVNqf.png)
github profile img
I am encountering an issue where certain commits made to my GitHub repository are not visible in the commit ...
0
votes
0
answers
20
views
Visual Studio Extensibility SDK - Listen to git events
I have a Visual Studio plugin and I'm trying to listen to the Repo Push or Repo Commit event.
Is there a way to listen to a git event?
The plugin is for VS2022 and VS2019.
1
vote
1
answer
34
views
Revert changes in Git "main" to prior commit, after branching out with all changes since in "new-branch"
I erred by working locally on a local repo's "main" branch, instead of branching out with a new branch and modifying code there. I brought more modifications to the code than I thought I ...
0
votes
2
answers
32
views
How to commit and keep history only for the code?
I'm planning to use Github to store my website's code + images (logo, etc.) and when I make changes on my computer to git pull directly on the server (without having to SFTP all the time). The website ...
0
votes
0
answers
10
views
fixing a commit message that isn't the last commit
I make a mistake in my commit message in GitHub. what I have done
I navigated to the directory where I wanted its commit message to change.
To make vs code my default editor I ran this: git config --...
0
votes
1
answer
140
views
How to access the last commit identifier in Go code? [duplicate]
Is there any way to have access to the last commit's identifier in the go code? I'm going to use it for the naming the output files my code generates and in this way I can find outputs related to each ...
1
vote
0
answers
86
views
validation error while committing code on git
I was working on angular java project. and while committing code i found below error.
× Validation Error:
Invalid value for 'linters': { '.@(js)': [ 'eslint --fix', 'git add' ], '.@(ts)': [ 'tslint -...
1
vote
0
answers
26
views
Reduce github repository size by deleting commits
My github repository once had one commit with a very large executable inside, and some time later I realized this takes me (and other people) huge of time to clone it from anywhere, so I deleted this ...
0
votes
0
answers
40
views
How to combine two history commits without making the whole history linear?
For example I have a commit history like this
* commit XXX
|\ Merge: XXX XXX
| |
| | Merge branch 'dev'
| |
| * commit XXX
| |
| | e
| |
| * commit XXX
| |
| | d
| |
| * commit XXX
| |
|...
0
votes
1
answer
56
views
What is the correct order of git command I should use?
I have 3 local branches master, A and B. This is a old project, I did not updated the my local repo for a long time.
I made some changes on B, and then git checkout A; git pull master to update my ...
0
votes
1
answer
40
views
How to merge multiple commits onto another branch with multi (number of co developers) squashed commit?
Now there is a branch(branch1),
three people P1 P2 P3
they develop together on branch1
with the comimit log
P1 commit1
P2 commit2
P3 commit3
P3 commit4
P1 commit5
P2 commit6
...
P1 commit100
...