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

Instead of git checkout file one by one, checkout a whole commit

I have a situation where I committed to a branch B1. In the commit I have several files. Now I want those files to be copied to a Branch B2. Actually I am using the following command for each file in the commit on my current branch B2: $ git…
vanessen
  • 1,125
  • 1
  • 12
  • 19
0
votes
1 answer

How to get last commit code added in a particular file to another temp file

This is the latest commit code change (added text "new line added"). How can I get this text to another temp file? $ git show commit c3fc4d58275740e5abc85219d75c2c00f3027a46 (HEAD -> my_branch, origin/my_branch) Author: ******** Date: ******** …
LUSeR
  • 1
  • 1
  • 1
0
votes
1 answer

Fatal error when committing changes to git from visual studio

So everything was working fine, until yesterday I wrote some code and pushed, but nothing changed in GitHub, so I came and added a comment line and commited then it said fatal error : Git failed with a fatal error. error: invalid object 100644…
Vuqar Rahimli
  • 11
  • 1
  • 4
0
votes
1 answer

committing both live code and tsqlt tests

My company has recently started using tSQLt to test our codebase. We've built a few good test suites and now we're trying to figure out the best way to commit them. We're using an SQL server with Redgate to commit our live code to a github.com…
0
votes
0 answers

Git commit bypassing other commits

We have an issue where one of our devs has committed some changes which have in effect bypassed a bunch of other commits by the rest of the team. You can see this in the image where K has a commit on 14/05/2021 which loops back past the other…
0
votes
1 answer

Can I recover staged changes after checkout?

Recently, I staged many changes in over 100 files. Then, unfortunately, I did a checkout of a previous commit. After the checkout all my changes are gone and not visible anymore (I'm using Fork to work with git). Are my changes really lost or can I…
Lars
  • 920
  • 1
  • 14
  • 34
0
votes
0 answers

Truncate github comments, output to github commit comment first 20 errors only

Github has a maximum character limit for comments (seems to be about 65000 characters). This is way too long to be useful, but we are generating some output that is longer than this. Desired functionality: output to github commit comment first 20…
Sam
  • 1
  • 1
0
votes
0 answers

Git checkout to previous commit ID didn't revert the changes. Any possible explanation?

I am having an issue with git. I made a simple python file in a git initialized folder. Then I added it and committed it. Then I edited it, added another csv file to the folder, and committed it again. The problem is, when I check out to the…
0
votes
1 answer

Github PR wrongly Considering a File Add & Delete as File Move

I have the following setup in my GitHub GitHub Main Repository: QAScript1.sql with oldData GitHub Dev Repository : I have updated QAScript1.sql with newData, Added new file ProdScript1.sql with sameContents as QAScript1.sql and committed both these…
Vijay Manohar
  • 473
  • 1
  • 7
  • 22
0
votes
2 answers

Edit a specific commit and reapply subsequent commits

I am currently submitting open-source code and the structure of commits are quite strict. I have three commits, let's call them A, B and C. It is important to note that all changes are within the same file. Furthermore, I have received feedback on…
Hedam
  • 2,209
  • 27
  • 53
0
votes
1 answer

How to show at least two commits which has same parent commit

Title says it all. So far I've come across solution which basically shows commit and it's parent commit, but it needs further filtering. Is there better approach? git rev-list --all --min-parents=1 | while read child; do parent=$(git rev-parse…
Wakan Tanka
  • 7,542
  • 16
  • 69
  • 122
0
votes
1 answer

How to find pre-commit id covered by a new forced push commit id?

I add my code change to repo, I can see the commit id by git log -n1. Then I combine a new change to pre-commit id using git add -u; git commit --amend; git push -f. Then I suddenly forget what's the diff with second change. But the pre-commit id…
mariolu
  • 624
  • 8
  • 17
0
votes
2 answers

How do I commit a file for only some users in a git repo?

I am pretty sure people have faced this issue before, but I am not able to find any solution. I have been working on an android library and plan to make it open source by putting it on GitHub. I would like to, however, only expose the maven upload…
0
votes
1 answer

How can a specific git repo contain only one branch, and yet each of its 94 tags returns files which do not appear in the branch?

I see in this publicly available GitHub repo, https://github.com/ServiceNow/devtraining-needit-quebec, only one branch, main, which contains three small files and a folder with a small file: update…
Justin Haynes
  • 79
  • 1
  • 7
0
votes
1 answer

Git local commit timestamp when pushed

I have a simple question. I am working on a feature locally and have made numerous commits without pushing them yet. Once I push these commits, will they have the timestamp (seen in GitHub) when the commit was made locally or rather the timestamp…
Elias
  • 432
  • 6
  • 17
1 2 3
99
100