Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [git-commit]

git-commit - Record changes to the repository along with a log message.

git-commit
0 votes
0 answers
38 views

Shell script to add and commit in batch of files at a time [closed]

I will like to fix the issue where "git add" fails when a space is detected in the path file name. e.g source/code/data form/documents.txt. How can I update this script to allow file names ...
Ctan Li's user avatar
  • 187
-2 votes
0 answers
20 views

How to remove a commit showing up on merge request activity on home page

I accidentally added a sensitive file to my GitLab commit. The branch is part of a merge request and I don’t have admin rights to this repository. I deleted the commit by rebasing it. I then did a git ...
TECHKEY's user avatar
  • 101
-2 votes
0 answers
59 views

Why does `Could not execute the todo command` reappear after `git rebase --edit-todo` has been executed?

I commit a secret and now GitHub doesn't allow me to push. Following Pushing a branch blocked by push protection - GitHub Docs I use git rebase -i 9dea936~1 but I get: fatal: invalid upstream '9dea936~...
Ooker's user avatar
  • 2,637
0 votes
2 answers
47 views

Remove all commits prior to a commit with `git filter-repo`

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,147
0 votes
0 answers
22 views

Maintaining stacked PRs with constant amending

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
  • 503
2 votes
1 answer
30 views

Remove Committed files from local git repository

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
64 views

Is there a way to reset or remove all my commits into the dev branch?

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
19 views

intellij # lines show in commit log

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
60 views

git: commit amend created parallel commits

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
27 views

Author Name missing/wrong in Commit besides correct config

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
  • 184
0 votes
2 answers
52 views

Why can I not undo some changes in Git?

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
41 views

git is trying to merge on 'edit' command during 'git rebase --interactive <commit>'

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
  • 735
-3 votes
1 answer
53 views

Git commit the file currently being edited in VS Code [duplicate]

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,617
3 votes
1 answer
49 views

How do I use `git commit -v` with `git rebase -i`

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
  • 26.7k
0 votes
1 answer
33 views

What is the Git command to sync an already deployed github project with the visual studio code?

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

15 30 50 per page
1
2 3 4 5
145