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
0 answers

I am trying to get the commit hash of a specific past builds in Jenkins

I have tried the following to get a commit sha of a specific build. But Jenkins showed a security error. Is there a possible way to achieve this? import hudson.model.* def jenkins_job_name = "Some Job" def build_number = 46 def jenkins_job =…
Abhinay Reddy Keesara
  • 9,763
  • 2
  • 18
  • 28
0
votes
1 answer

TortoiseGit amend merge commit: "show diff to last commit" checkbox is disabled

I'm trying to commit --amend to a merge commit with TortoiseGit 2.13.0.1. For a repository where the last commit is a merge commit, the "show diff to last commit" checkbox is disabled (greyed) and checked after i check the amend checkbox; it doesn't…
ridilculous
  • 624
  • 3
  • 16
0
votes
2 answers

How to fix "Head detached from "?

I checked out a previous commit in my project recently, and just noticed when I ran git status that it was returning HEAD detached from 7263532. These are my most recent two commits: commit 8a870e8a1cb63bac7e9ec732908e54f20e841bb3 (HEAD) commit…
gkeenley
  • 6,088
  • 8
  • 54
  • 129
0
votes
1 answer

Can I use git to find which commit is needed to fix a branch?

I have a git tree which looks like this: master (test passes) | | | stable (test fails) | | | / +--- | There is a test which fails when run against the stable branch, but passes when run against the master branch. As it is a complicated…
Rich
  • 926
  • 1
  • 9
  • 17
0
votes
1 answer

Commit separately specific files inside untracked new directory in git

I have a new created directory "supplier_directory", in which there are 3 new files. I need to add these files into different commits. Commit N1 : file1 only Commit N2 : file2 and file3 I'm having the following: supplier_directory when…
0
votes
0 answers

How to squash 2 pairs of non-consecutive commits?

What I have is: A -> B -> C -> D My aim is to get 2 commits like A+C and B+D. What I am thinking is: git rebase -i HEAD~3 Making the commits pick A squash C pick B pick D Now, I will move the head back git reset --soft HEAD~2 If I understand…
NiRvanA
  • 105
  • 1
  • 1
  • 8
0
votes
2 answers

use bash case statement in gitlab ci/cd

so i have a pipeline that checks 2 repos every 24 hours and pushes changes to a 3rd repo. the pipeline looks like this: - git fetch $CHEATSHEETS - git fetch $BASH_ONELINER - git add -A - git commit -m "Update has been successful" || echo "error" -…
kvelev
  • 53
  • 10
0
votes
1 answer

Semantic versioning: Am I allowed to move git tags to a different commit?

Let's say I tagged commit A of my library with tag v1.0.0. Now, I make a minor fix in the API documentation, let's say, fixing a typo. I commit this change, so new commit B now comes right after A. Am I allowed to move the v1.0.0 tag to commit B,…
Amplify
  • 865
  • 1
  • 8
  • 18
0
votes
1 answer

Getting the state of a commit, and reapplying it in another

Setup: ----- master branch \ \ sprint branch \ my branch --> commit a --> commit b How can a commit c be created with…
Sebi
  • 4,262
  • 13
  • 60
  • 116
0
votes
3 answers

How add new empty-lines in the message of one-line command "git commit -m"

If I want to not use any text editor and put all the commit message including subject and body lines into the useful one-line command: $ git commit -m 'message including subject and body lines' , I need to insert first body-line two lines after…
muel
  • 43
  • 1
  • 13
0
votes
1 answer

Get latest commit which contains a particular string

I want to get the latest commit which contains a string. For e.g. String = TAG_2021_09_0051 I have tried git log --grep "TAG_2021_09_0051" which gives me below ouput as string is present in two commits. But I want the latest commit from which I…
0
votes
0 answers

How to merge with merge commit

When I try to merge with command: git merge --no-ff -m I get message: Already up to date. but it's not! When I'm trying to merge like: git merge origin branch is merged fast-forward. But I need merge…
anna
  • 433
  • 7
  • 18
0
votes
1 answer

why wont my latest commit on github pass checks for github pages?

my github commits If you look at the image, an old commit is currently in use for the github pages, why and what do I have to do to make the latest commit pass checks? I have been told to try vigilant mode but I don't think thats what the issue is…
fish
  • 1
0
votes
0 answers

How do I make a new branch in git with no commits

I have a local repo for a website I am helping make. I edited some element of the page and I wanted to push the change. The leader of the site project told me to make a new branch, e.g enhancements/pagename, commit the changes I made to this branch,…
Hydrolox
  • 1
  • 3
0
votes
0 answers

Author Validation failed. Please make sure your git identity is correctly configured. Author and committer must match in firmwide Directory

I am getting the issue mentioned in the title while I'm trying to push my files from my branch. I have checked git config --list User. Name and user. Email is correctly configured. I have also tried Git commit --amend --reset -author This command…
Leo34
  • 23
  • 6