Questions tagged [commit]

Questions about committing a transaction or "unit of work" to a database, application or version control system.

The usual context of this tag is application and/or database transactions but it is also applicable to version control software.

Within the application/database context, a commit means that all state changes made during the current transaction are made permanent.

Within the context of version control software, the "unit of work" being committed is the total change being written to the central store. Usually, "commit" refers to the command used to perform this action (e.g., git commit or svn commit).

The nature of different source control systems lead to different styles of committing. However, there are generally two agreed upon practices:

  1. Commit only single units of work (fixing a single bug, adding a single feature, etc.) - this makes history easier to walk through. Conversely, avoid making large, sweeping commits, which pollute history.

  2. Commit messages should be fairly concise and clear. This makes understanding who has done what (typically done using a command like blame) easier. This practice is an extension of the first, because single units of work are easier to write clear commit messages for.

Beyond these two guidelines, the majority of workflow is determined by how distributed a version control system is. Generally speaking, what goes into a centralized system like Subversion is much more strictly controlled because it is harder to undo; most commits in a centralized system involve running a project's entire test suite.

Distributed systems like Git tend to be less strict about what is committed, because it is the author who chooses when to push commits to a remote repository and can run test suites before choosing to push their changes; also, any mistakes can be reversed by editing private history.

3350 questions
1
vote
0 answers

TortoiseSVN commit is taking so long that connection to remote end is getting closed down

For a project at uni we have to work on an existing project with about 13000 files. We need to do an initial commit to our svn repo, however the transfer rate in TortoiseSVN is so slow that the connection to our remote end gets closed down every…
kden9798
  • 21
  • 2
1
vote
0 answers

Create git commit C that is the inverse of the difference of B and A

So, I have a git repository that I worked on for years in private. Basically, I only used one branch (MASTER), and git was basically like a journal for me. Now, I want to make this source code public, but I want to remove files that I don't have…
user1748155
  • 1,345
  • 1
  • 9
  • 17
1
vote
3 answers

How do I commit my saved files on GitHub to a different branch?

Currently, the branch that I can commit saved files to is master. However, I want to commit my saved files to a different branch called "First-Level" (I'm designing a game). But I haven't managed to make it work for now. It will only continue to…
1
vote
1 answer

GitKraken displaying old commit on top of the tree

I'm not sure if this was the best description of the issue I'm facing. What's happening here is totally weird. I'm working in a project in which I use bitBucket integrated with gitKraken. Here is the workflow: 1 - I commit changes to my own branch 2…
Arturio
  • 418
  • 1
  • 7
  • 25
1
vote
1 answer

Change commit name - Github

I need to know how I can change this commit name:
Benzo
  • 79
  • 8
1
vote
1 answer

git commit message in one line?

Is there a way to show the whole commit message in one line? Here is my commit message: git log -1 here this is a change it is a empty change Output: here this is a change it is a empty change
1
vote
1 answer

How do I remove unwanted commits form another branch for PR

I've done a stupid thing. I branched from branch A, made changes on a new branch, pushed and made a PR into branch B (also bringing a lot of unwanted commits into it). My problem is that I need to get rid of several commits only on a branch where I…
1
vote
1 answer

Commit failed with error 0 files committed. Will not add file alias XXX already exists in index

I have refactored the name of messageServices to MessageServices, but I did it properly so not sure what's going on and why. WHen I got to commit, I see that there are two checked files, messageServices and MessageServices, though in my file tree I…
Tsabary
  • 3,119
  • 2
  • 24
  • 66
1
vote
2 answers

Git commit does not work even if I add, it's saying "Changes not staged for commit"

enter image description here First I cloned the repository and changed the file. After I tried to add and commit but commit doesn't work I tried to add --all add . add filename but doesn't work... goott-1-13@goott-1-13-PC MINGW64…
hwiba
  • 413
  • 1
  • 4
  • 8
1
vote
1 answer

Merge branch in GIT and keep the commit message

I want to merge a branch in GIT and keep the COMMIT MESSAGE. Not wanted: git merge --no-edit This keeps the default message: Merge branch 'master' into develop Wanted: I want to copy the message: ACC-9187 Reformat code instead of the Merge branch…
Dimitri Dewaele
  • 10,311
  • 21
  • 80
  • 127
1
vote
0 answers

GitPython - git add - error - file not recognised

I am facing problems when trying to add a specific filename to a commit. I can get it working via --all or u=True etc. but when I state the specific name within the command, it gives me the following error: raise GitCommandError(command, status,…
DB-93
  • 13
  • 4
1
vote
1 answer

Undo git rebase skip on local

I did a git rebase HEAD~3 to edit some commit messages, however when I entered the interactive mode, it showed more than my last 3 commit messages. It showed a bunch of other commits. Every time I went on each of these other commits, it warned of a…
henhen
  • 1,038
  • 3
  • 18
  • 36
1
vote
1 answer

svn: post commit hook

We use VisualSVN Server for code syncronization... and I'd like to add some routine operations after each commit. They're quite usual...create directories, making zip backup and so on. so I wrote cmd script to do them but can't execute it. I did…
Nick
  • 820
  • 2
  • 14
  • 29
1
vote
1 answer

is there a way to reviews commits to bitbucket repositories without using pull request?

I am trying to have code reviews on each commit done since team members are directly connected to a bitbucket repository... I am trying to do this instead of having team members fork the main repository and create pull request while also avoiding…
Balry
  • 77
  • 10
1
vote
1 answer

IntelliJ/Git - No warning when switching branches

In IntelliJ when using Git Branches, I normally have received a prompt asking me to commit changes before changing branches. However, now this prompt is not showing anymore, resulting in some annoying issues when I forget to commit. I have looked…
Arne O. Ose
  • 63
  • 1
  • 7
1 2 3
99
100