Skip to main content
Filter by
Sorted by
Tagged with
Best practices
1 vote
3 replies
61 views

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 my branch history? Should I use git reset --hard HEAD?
10 votes
1 answer
19k views

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

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

Im using Azure repos and where can i find graphs like github in azure devops ?
3 votes
4 answers
815 views

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 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? For example, if I push with the commit message "smoke_test", only (one specific workflow ) smoke test ...
1244 votes
33 answers
736k views

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

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

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

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 ...

1
2 3 4 5
68