3,375 questions
Best practices
1
vote
3
replies
61
views
How to make one commit of several changes on GitHub when working via the GUI and not using command line
First of all, yes, I have read all topics here related to my question. But other questions are based on changes made locally and using command line.
I'm asking about this specific situation: working ...
0
votes
1
answer
447
views
Long time commiting file Intellij IDEA
I'm have one update file in project. But it's very long time updated. Antivirus windows deactivated. What could be the problem? Intellij IDEA Community.
I'm try off my antivirus and reload Intellij ...
304
votes
4
answers
176k
views
Install specific git commit with pip
I'm developing a django app and I'm using pip to manage my requirements. How can I do to install a specific git's commit?
In my case I need to install this commit:
https://github.com/aladagemre/...
269
votes
6
answers
250k
views
How can I delete the last n commits on GitHub and locally?
I'm trying to delete the last two commits from one of my GitHub repositories. I've tried as suggested here: git push -f origin HEAD^^:master. It seems that it works, as the last two commits are ...
1
vote
2
answers
9k
views
How to add multiple already created tags into specific commit? (GIT)
I am facing issue that I would like to use more tags for specific commit (last one or in history).
For example I would like to have commit which contain tags: "v1.2" and "Release" ...
18
votes
2
answers
27k
views
Git - Cherry picking with ours/theirs strategy
I wonder if there is any way of cherry picking with ours/theirs strategy. On other words, I want to cherry pick multiple commits from dev branch into main branch with below commands,
git cherry-pick ...
2
votes
2
answers
5k
views
How do I cleanup Git Commits messed up by Rebase
Here's what the commit history looked like before I mucked it up:
A B C [master]
\
D E F G H I [refactor]
Here's what my current commit history looks like:
A --------------- E B C F D [...
2
votes
1
answer
70
views
How to wait for replication at mariadb transaction commit?
I have a MariaDB cluster made with Galera and my clients use MaxScale with RW router.
I'm having an issue because the application has something this sequential steps:
Start trx1
Insert new record
...
10
votes
3
answers
12k
views
GitHub API create commit
I need help with GitHub API,
I need commit new version of file through API, I'm trying to achieve this by sending post request to
https://api.github.com/repos/:username/:repo:/git/commits/
with data
{...
3
votes
3
answers
4k
views
Get tags of a commit
Given an object of GitPython Commit, how can I get the tags related to this commit?
I'd enjoy having something like:
next(repo.iter_commits()).tags
2
votes
1
answer
5k
views
How to modify response status and body after committed spring boot
I implemented a rate limiter with Filter.class. However, we encountered that we should not limit successful requests. So, I needed status code of the response. When I get status code in Filter chain, ...
2
votes
3
answers
281
views
Tortoise SVN asking to be updated with nothing to update
I go to commit a bunch of code, using Tortoise SVN, and it barks at me, telling me I can't do so without updating.
So, I update. It tells me that I am fully updated, having updated absolutely ...
46
votes
6
answers
50k
views
How do I list just the files that would be committed?
Is there any way to get a list of files that will be committed when I type the following?
git commit -m "my changes"
git status lists too much. I could strip out all the words, but I'd rather not. ...
0
votes
0
answers
18
views
Transactions not rolled back in FrankenPHP worker mode cause data loss after deployment — has anyone experienced this?
I’m running an application using FrankenPHP in worker mode. In one script, I use BEGIN TRANSACTION → SELECT → INSERT → COMMIT if certain conditions are met. But I forgot to call ROLLBACK when the ...
299
votes
3
answers
197k
views
How do you move a commit to the staging area in git?
If you want to move a commit to the staging area - that is uncommit it and move all of the changes which were in it into the staging area (effectively putting the branch in the state that it would ...
4
votes
5
answers
3k
views
svn : How to split a large commit into several small commits?
I have created a new repository for a project and am adding some exisiting code base (llvm) to it. This code base is about 18,000 files which is making the my initial commit take lots of time. (read 5 ...
11
votes
2
answers
28k
views
Does call to rollback() method have effect only if call to commit() method does not succeed?
I am new to Java JDBC, and developed a small database application. I am learning from O'Reilly - Database Programming with JDBC and Java 2nd Edition.
Does con.rollback() have effect only ifcon....
0
votes
1
answer
133
views
Show differences between commits with respect to a base
We use a common git strategy:
branch from main to a feature branch.
do commits in feature.
if main progresses, merge it to feature.
merge feature to main.
I want to view the changes that happened ...
4499
votes
42
answers
5.7m
views
How do I delete a commit from a branch?
How do I delete a commit from my branch history? Should I use git reset --hard HEAD?
10
votes
1
answer
19k
views
Does the Pandas DataFrame.to_sql() function require a subsequent commit()?
The documentation for the Pandas function to_sql() available for DataFrame objects (see to_sql() documentation) does not state that a commit() call on the connection is needed (or recommended) to ...
40
votes
6
answers
25k
views
Referring to the previous/next commit in git?
I have seen git commands use a syntax such as HEAD~, but I haven't been able to find this syntax in the Git Reference Manual.
Here is what I have understood: <commit>~<n> refers to the ...
11
votes
2
answers
12k
views
Where can i find contribution graphs in Azure DevOps
Im using Azure repos and where can i find graphs like github in azure devops ?
3
votes
4
answers
815
views
How to undo multiple “git commit --amend" or to get difference for each amend commit?
I did by mistake more than 100 amend commits. How can i convert them to usual commits? Or at least to get git log with difference for each amend commit?
I can see only difference for all amend commits ...
23
votes
4
answers
37k
views
How to clone a repository from a specific commit ID?
I'm trying to clone using HTTPs a repository (sample.com/component.git) but from a specific commit ID.
Should I fetch the repoistory, then checkout that commit ID and finally clone it, or what would ...
0
votes
2
answers
2k
views
Develop branch X commits behind Main branch after successful Pull Request
My Develop branch is showing as 2 commits behind the Main branch after I made a pull request merging Develop into Main on GitHub. It's now suggesting to me to do a pull request and merge Main into ...
99
votes
6
answers
162k
views
Why Git is not allowing me to commit even after configuration?
This question seems like a duplicate but it's really not. Just a slight difference that keeps on repeating. git keeps on telling me: "please tell me who you are", even after setting it up. when I run ...
0
votes
1
answer
45
views
Create commit from several files of another branch
Suppose I have a branch B1 that added files A, B, C, ..., Z.
Suppose I am at branch B2.
What I want is to get a subset of files (say A, E, I, O, U) from the latest state of B1 and create a commit in ...
339
votes
5
answers
91k
views
How can I find the commit in which a given file was added?
Say I have a file foo.js that was committed some time ago. I would like to simply find the commit where this file was first added.
After reading the answers and my own tinkering, this works for me:
...
1
vote
2
answers
94
views
How can I change code within a commit to help find a bug?
I am trying to track down a specific bug in my code, but the trouble is the bug appeared somewhere in a block of commits where the only way to check if the commit breaks is commented out, so I can't ...
10
votes
2
answers
2k
views
What git commit practice is better?
I truly believe that to have one commit on one issue is a good practice. I'm sure I read it somewhere in an article like “Best practices”.
As such, my workflow has been the following:
For a new issue,...
3
votes
1
answer
2k
views
Semantic release - include in CHANGELOG the commit subject, body and footer
I am trying to configure semantic release to include the subject, body and footer of the commit messages in CHANGELOG.md file, not just the subject of commit message, but no success. In my changelog I ...
0
votes
1
answer
114
views
Why on Azure DevOps after pull request on repo one appear 1 behind
Azure DevOps Repos, situation is really simple, we have
Branch Master ---+---+ Head
Branch Develop ---+---+ Head + ... + changes
After some commit on Develop, we create pull request from ...
10
votes
2
answers
4k
views
Is it possible in git to push commits one by one instead of all of them at once?
I'm using a really unreliable connection and while I try to stage commits so none of them is over 20mb and/or to push them once they reach a size like that, sometimes it's not possible (a few of the ...
1
vote
1
answer
1k
views
How can I commit permission changes in a ClearCase repository?
I'm working on a ClearCase repository. Some of the files in it have, for some reason, execution permissions while they shouldn't (they're text files basically). I'll also mention I'm a user without ...
1
vote
1
answer
3k
views
How to Use GitHub Copilot for Commit Message Generation
I am interested in using GitHub Copilot to help generate commit messages for my project. I have heard that it can provide suggestions based on specific commit message instructions. However, I am not ...
2729
votes
23
answers
1.5m
views
How to branch from a previous commit
If I have an n number of commits, how can I create a branch from the n-3 commit?
-1
votes
2
answers
171
views
Slack github connection
I am the student who make the small study group which encourage programming study and commits every day.
And I want to check the commits, so I want to connect github repo in slack,
and finally find ...
2
votes
1
answer
4k
views
Git: Remove old mode 100644 new mode 100755 on previous commits
I was working on my old Android phone's kernel. I imported the manufacturer's changes and split them into commits.
However, after I finished the process, I realized that there are a lot of files that ...
8
votes
3
answers
9k
views
How do I edit past git commits to remove my password from the commit logs?
My problem: cygwin git doesn't seem to correctly prompt for credentials when using https:// URLs, so I used username and password in the URL. Unfortunately when I did a "get pull" it auto-commited a ...
8
votes
1
answer
6k
views
How to git clone 'git' metadata only
I have a remote repo called FOO which has the two following revisions:
commit1
commit2
I have a directory 'bar' which contains all the files for commit2 but I am missing the .git directory and all ...
27
votes
5
answers
52k
views
What to do after typing in commit message for git?
After I type in git commit -a a text editor pops up and I type in my comment. What buttons do I have to press after typing in the comment, to get it to move to the next stage of actually committing?
...
-2
votes
1
answer
84
views
Visual Studio Code Source control not displaying files modified
I am trying to setup a React project in my laptop , cloning from a repository. Using VS code . Any files changed or added is not displaying on the source control. However only when made some changes ...
67
votes
6
answers
67k
views
git clone and checkout in a single command
The following is the command I use to checkout a specific commit.
git clone git://repo.git/repo123
git checkout <commitID>
I want to do the above in one step - using a git clone command only.
...
6
votes
5
answers
18k
views
"Untracked Files Prevent Checkout" except its vcs.xml
I'm trying to merge a branch with the master, so I checked out the master but now it won't let me do the merge:
Untracked Files Prevent Checkout
Move or commit them before checkout
.idea/vcs.xml
I ...
-1
votes
1
answer
54
views
There is one active patchset which is not merged to my Master....I want to merge that patch set to my local and don't want to affect remote [closed]
There is new version of 8 of my files which I have cloned , Those new 8 files are presented in a patchset which is not yet merged with the master,So I want to replace my old 8 files in local with that ...
10
votes
4
answers
15k
views
Is there any way to trigger a specific Github action workflow by commit message value?
Is there any way to trigger a specific Github action workflow by commit-message value? For example, if I push with the commit message "smoke_test", only (one specific workflow ) smoke test ...
1244
votes
33
answers
736k
views
How can one change the timestamp of an old commit in Git?
The answers to How to modify existing, unpushed commits? describe a way to amend previous commit messages that haven't yet been pushed upstream. The new messages inherit the timestamps of the ...
1756
votes
21
answers
1.4m
views
Changing git commit message after push (given that no one pulled from remote)
I have made a git commit and subsequent push. I would like to change the commit message. If I understand correctly, this is not advisable because someone might have pulled from the remote repository ...
2
votes
2
answers
2k
views
git vscode autostage files on change
I have various log files that I'm tracking through git, and because they're log files, they are constantly changing with every commit.
I would like for these files to be automatically staged (git add ....
0
votes
1
answer
54
views
Create a new branch from a commit online in GitHub?
I need to make a new branch from an old commit because I don't want the new broken code. I want to do it on GitHub online. That is, I don't have GitHub desktop and I can't get it because of work ...