Questions tagged [git-commit]

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

Stores the current contents of the index in a new commit along with a log message from the user describing the changes.

Added from reference

2117 questions
0
votes
1 answer

Couldn't save backup of : git commit error during merge

I am trying to merge branch p-jira-fix changes into branch p-main changes. Branch p-jira-fix has renamed one file from UserBase to EntityBase and somehow when I am running the git commit command, I am facing the following error regarding that file…
coretechie
  • 1,050
  • 16
  • 38
0
votes
1 answer

MR squash is removing commit message details

I was working in a branch and my commit had a very detailed message. The format was: Title Details (multiple lines). I created an MR but when the MR was merged I can see the merge commit and my new commit with only the Title. The details are…
Jim
  • 3,845
  • 3
  • 22
  • 47
0
votes
2 answers

Git manually specify parent commits

To merge two divergent branches (say I'm on master and want to merge topic), sometimes it's easier to manually merge files by inspecting git diff and applying the changes manually (or parts of them automatically using git apply). However, this just…
Mark
  • 31
  • 4
0
votes
0 answers

accessing file content for specific commit sha

I have two types of files (xml and java) I tried to access a specific file to a specific commit SHA , and after that, I want to print the content of this file from line X to line Z For example, I have this ** java file…
waled
  • 3
  • 2
0
votes
0 answers

Why are commit timestamps not showing on certain files in VScode and showing on others?

Within the same directory where I have various study materials and files, I noticed that some of the files will accurately show when the last commit was made pertaining to that while and yet other files, even as I make a modification and a commit,…
0
votes
1 answer

Creating a pull request rule on GitHub that prevents me to accidentally push new code to main branch

I am working on a repo where I am the owner and only author in it. I want to have in my repo the same behavior as I would when working with a team that protects my branch from direct commits as they must go through a Pull Request. The reason for…
Alon Shlider
  • 1,187
  • 1
  • 16
  • 46
0
votes
0 answers

How do I change the author and author email for multiple commits?

This was a problem I wanted to solve. When I searched up this question, I saw answers using git filter-branch and git filter-repo. I can say with 100% confidence that git filter-branch is too slow and I don't like that it can change the same commit…
0
votes
0 answers

How to create a branch of the diff using git command line

I forked a project (i.e., MainProject:main ) into Jay:main. I created a new branch Jay:feature from Jay:main. In MainProject:main I created a pull request using Jay:feature. After many merges done to MainProject:main, my PR has a conflict that need…
Jay
  • 1,168
  • 13
  • 41
0
votes
0 answers

Why am I unable to checkout a commit in git

I see error while trying to checkout a commit git checkout 430f6c81c0a39b58b557b53e9569d9b786731d82 fatal: reference is not a tree: 430f6c81c0a39b58b557b53e9569d9b786731d82 Is there any work around for this I am able to see the commit in…
ambikanair
  • 4,004
  • 11
  • 43
  • 83
0
votes
1 answer

GitHub pull request show All checks failed after a very minor commit

GitHub integrates jenkins and SonarQube: My git commit showed the following issue as detected by sonarQube: Rename this field "GSON" to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule To resolve this I made a very minor commit, I just…
fatimasajjad
  • 605
  • 8
  • 16
0
votes
2 answers

Triggering a workflow run after an action commits

In a repository we have : a workflow that runs on: pull_request so it runs each time I open/ commit to the pull-request (which I opened) we have an action (runs manually) that commits to the pull-request (updating some files in the branch) when…
Sh.F
  • 11
  • 3
0
votes
0 answers

I have one commit on my branch, why does rebase onto main step through each new commit on main?

I have one commit on my branch which has modified 6 files, but when I try git rebase --pull origin main, or just rebase my branch on top of main, I am forced to step through each new commit on main separately. Why is rebase not just prompting to…
Ali
  • 193
  • 3
  • 13
0
votes
0 answers

How to amend file in previous to last local commit?

I'm aware of various ways to amend the latest local commit. I'm looking into updating the file in previous to last local commit. Searching SO, I didn't find anything relevant. Is this achievable? If yes how do I do it?
mtk
  • 13,221
  • 16
  • 72
  • 112
0
votes
0 answers

git commit -a isn't skipping the staging area

Hello I'm a beginner and I'm learning to use Git with a Youtube toutorial. The instructor did git commit -a to directly commit files without using git add command. But, when I used the command on my system, I get this for some reason - screenshot of…
Adityashu
  • 1
  • 3
0
votes
0 answers

Should fork be first synced with master or should you commit changes first?

I am working on a repository and forked it 2 days ago. After forking and cloning it in my local, I made changes over these past 2 days. I have not yet committed any changes nor I have pushed my feature branch to my fork. Meanwhile in these 2 days,…
Bhakti.J
  • 11
  • 3