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

How to exclude non-project files from git commit in PyCharm?

I have a project setup, where I have one git repo with two folders in it. Each folder is a separate project in PyCharm. Both projects are connected to that repo. When I update the code of one project, the other project notices that and adds the…
0
votes
0 answers

TortoiseSVN Commit is forbidden by github

Commit a code to Github using TortoiseSVN is forbidden. Following is the message that I could get: It has been working well a couple of weeks ago. I do now know why it has a problem.
htna
  • 1
0
votes
0 answers

commits form merged pull request not showing in master

I have merged a pull request to the master branch, now when I checkout to the master branch I can't see the commits done in the pull request, and I lose all work done since the creation of thee pull request. any idea why this is happening and how to…
anonymous
  • 37
  • 7
0
votes
1 answer

How to make the parent repo branch point to submodule repo branch

Parent repo - a separate branch submodule repo - a separate branch In Bitbucket Every time I push a commit to the submodule I need to update the parent repo to the latest commit in the submodule. This is because when I used the submodule, my parent…
Bala krishna
  • 519
  • 1
  • 10
  • 24
0
votes
1 answer

Delete initial git commit of main branch

How can I delete all the commits including initial commit from the main branch of my git project? I know we can do it by deleting .git directory and reinitializing the git project. However, I will miss all the commit history. So is there a way to do…
dgor
  • 704
  • 6
  • 19
0
votes
3 answers

Why is it necessary to enter commit messages?

I have been using git for a while now, and I had a question. Why is it necessary to add commit messages when using git commit? I mean, I admit that it is quite useful for me in some cases when I actually want to explain what a specific change does…
user13944038
0
votes
1 answer

How to show `git log` in the editor during `git commit`?

I repeatedly caught myself calling git log before git commit to see what were the last commits before making a new one. Is there a way how to automatically populate the commented-out section of the git commit message in the editor with the output of…
Quimby
  • 17,735
  • 4
  • 35
  • 55
0
votes
0 answers

Getting script and path name from commit hash

Is it possible to get the script name and the path where that script is located, from git hash commit value Suppose with the following details script name - script.sh path - /c/training/ I make some changes in script.sh and the commit hash is…
Helium
  • 49
  • 7
0
votes
2 answers

Is there a simple way to search through all the code of a git repo through all previous commits?

I have a private git repo where I have a keyword like abcde I previously wrote down in 1 of the files that may or may not still be in the repo today. Is there a simple way to search all the files of all previous commits for my keyword abcde? I'm…
letter Q
  • 14,735
  • 33
  • 79
  • 118
0
votes
1 answer

what happens after the amend and force push in isolated branch

I used force push to amend a commit message on my branch B. I'm working alone on this branch, then I requested a PR to master A. Will there be a problem after the PR is accepted? according to this answer, people that have pulled from my branch will…
rohitt
  • 1,124
  • 6
  • 18
0
votes
0 answers

I forgot 'git push'

I have several commits on my branch but I forgot to push them. Currently, those changes are in another computer so I wonder if there is a way to reach that commits without pushing.
magic bean
  • 787
  • 12
  • 39
0
votes
2 answers

Git - List all files last committed in master branch

My Question is very similar to this - May I list the files of the current commit? Problem Statement: I am trying to get the list of all the files which were new/changed in the last commit in "master" branch. What I tried: Ran these commands from…
Ajay Kumar
  • 2,906
  • 3
  • 23
  • 46
0
votes
1 answer

If git commit IDs are SHA-1 outputs, and SHA-1 produces 160 bits output, why are git commit IDs 320 bits?

commit 371a5e1b79515b13237a7cf88538eebfca028d9f (HEAD -> master-fix, origin/master-fix) Author: Krishna Birla Date: Tue Jul 13 18:31:13 2021 +0530 The commit ID is 40 bytes (320 bits). But git uses SHA-1,…
Krishna Birla
  • 332
  • 2
  • 10
0
votes
1 answer

How to move starting point of branch to an older commit

I'd like to rebase my branch onto an older commit to exclude code added by the newer commits. What I have: A---B---C---D---E master \ F---G---H---I---J experiment What I want: A---B---C---D---E master \ …
young_souvlaki
  • 1,886
  • 4
  • 24
  • 28
0
votes
2 answers

How to get locally committed changes to be reapplied as a merge commit from a branch?

I am working on a local git repository that doesn't have a configured remote one just yet. I accidentally started all my work on the local master branch. There are 22 commits so far and except the first two commits, I'd like all commits >=3rd onward…
PhD
  • 11,202
  • 14
  • 64
  • 112