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

git -- cross reference common commits across branches

I have a git repo that has multiple unmerged branches, and need to get a handle on what is where. SOME of them have had commits cherry-picked across, so if I do a list of commits using the top line of the log message, two of them would show the…
rimiha
  • 57
  • 5
0
votes
3 answers

Git commit without files or folder

Git is telling me to commit some 10000 changes but here's the catch, I deleted the folder in which the files to commit are located. Any thoughts on how I can stop git from telling me this.
0
votes
1 answer

Gitlab commit author is different than pipeline author (triggerer)

I think there was a previous git account on my computer, I tried to uninstall Git and re-install it and did the following commands to configure it : git config --global user.name "myusername" git config --global user.email myemail But I always get a…
xgeek652
  • 305
  • 3
  • 17
0
votes
1 answer

VSCode deleting staged commits

I have been working on a project for a week and a half now, went to commit my changes and this message popped up: Warning message: I selected "Yes". After which VSCode seemed to have deleted all my files that were added to the branch I was working…
Millar
  • 1
  • 5
0
votes
0 answers

Why would a local git repo be more ahead of remote after a pull than before?

The local master is on Centos and being used from the command line. The remote master is on GitHub. There's only ever one remote and I've checked it's the correct one. If I do git status and see this: Your branch is ahead of 'origin/master' by 3…
John Horner
  • 272
  • 2
  • 13
0
votes
0 answers

How can I diff two online files with full context?

I know there have been answers for seeing the diff in the full file, but I wish to diff two online files. I have a large list of commit hashes from public repositories. I wish to automate collecting the unified diff with the rest of the unchanged…
Queso Pez
  • 123
  • 5
0
votes
1 answer

What to enter for commit when trying to perform a git rebase?

A week ago, I accidentally changed my email settings to public on GitHub. I then made about 20 commits that I discovered weren't showing up on my contribution chart. I have changed my email back to private and set my global git config to the private…
Steven
  • 3
  • 1
0
votes
0 answers

Git re-do the last add and commit

Currently I am implementing some git hooks that clears my notebook cells when committing. Unfortunately, after committing the script fails (because the files are cleaned and interpreted as new files, which makes sense). Thus, I need to re-do the add…
0
votes
1 answer

Is there a way to reset the position of the commit button back in the sidebar in Intellij Idea community?

I was saving a file when i accidentally moved the commit button and now it is outside the sidebar. Is there a way to put it back in or reset the position of all the buttons?Screenshot
0
votes
1 answer

GitHub - error: failed to push some refs to dev repo after I amend a pushed commit

I'm new to git and I think I made a mistake and I want to know if I can still fix it. I have 3 branches which are main (remote repo), development (remote repo), branchA (in local repo). I'm working on branchA and I add two commits in it and pushed…
astra.xvi
  • 43
  • 7
0
votes
3 answers

git recreate refs/heads/master after gc

after I run git gc --prune=now the file .git/refs/heads/master is deleted how to recreate it? a remote application needs to read its text content (commit hash) .git/HEAD content : ref: refs/heads/master
geek175
  • 127
  • 1
  • 7
0
votes
1 answer

Git Updates were rejected because the tip of your current branch (main) is behind BUT branch is up to date?

"The tip of your current branch is behind its remote counterpart" means that there have been changes on the remote branch that you don’t have locally. And Git tells you to import new changes from REMOTE and merge it with your code and then push it…
0
votes
3 answers

Git push asks to fetch and merge but there is nothing to fethc or merge

I have been trying to get familiar with Git, new to programming. However, every time I seem to want to push git "git push origin main", I get an error saying my local and remote branches have diverged. I don't understand how this is possible is…
Dan
  • 25
  • 6
0
votes
1 answer

why the commit hang after close the commit message edit window

I am using cz-cli to format the commit message right now. First step, using cz command in terminal then the terminal will popup a window in Visual Studio and type the commit message into it, after close the commit message edit window in Visual…
Dolphin
  • 29,069
  • 61
  • 260
  • 539
0
votes
1 answer

Deny existing code edits before deployment?

Edits in existing IaC code should not be allowed. Only new code added to the file is allowed. Edits should either be denied when attempting to edit or at commit. Is this possible? Using Azure DevOps currently.
Hanscastor
  • 11
  • 3