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
1 answer

Best way to merge into a stable branch via a local git

I have 1 a git/github question. I forked from a master branch, name it fb, made updates to some files locally, git pushed fb onto github, and submitted a pull request on github (for a code review). Another colleague also submitted another PR, for…
pdn2020
  • 91
  • 1
  • 8
1
vote
0 answers

start a docker image after commit because of /tmp/.X1-lock already exist

I am reusing an image, and did a commit. $ sudo docker images [sudo] password for pt008300: REPOSITORY TAG IMAGE ID CREATED SIZE fedorawasdebug version3 …
1
vote
3 answers

Not committed data to into a git repository

I am trying to add some files from a server to a git repository. I am adding and committing the files, but when I push the files, no new files are in location. The following is the log information. Changes to be committed: (use "git restore…
1
vote
1 answer

Is there a way to list all classes that uses changed methods recursively?

I would like to know is there any way to lists all classes that use changed methods (after merging changes to master)? Best would be recursively, so if i got class with method that use method that use changed method it would be listed. Question is…
byRadzio
  • 33
  • 1
  • 6
1
vote
1 answer

Git commit with broken date

I've got an issue with a commit in a Git repo (It's big, and old), the commit in question was apparently committed on 1 Jan 2138, which is clearly wrong. As far as I know it should be 1st Oct 2019. The commit is on remote and there is a-lot commits…
Devan
  • 41
  • 5
1
vote
1 answer

Git Push into an Empty Repository error: failed to push some refs to

I've a problem with GIT for push into an empty repository with this error when I do git push --set-upstream origin master. On Windows I type in project's folder: git init git remote add origin…
Catanzaro
  • 1,312
  • 2
  • 13
  • 24
1
vote
0 answers

Why select operation has to be committed after calling apscheduler, or block the following modification?

import mysql.connector from apscheduler.schedulers.background import BackgroundScheduler def progress_bar(): pass def test(): conn = mysql.connector.connect(user='root', password='123456', database='test',…
Zeus0123
  • 11
  • 2
1
vote
1 answer

How to commit to own PR from other Computer?

I'm a bit stranded with github: I forked a repository on github a while ago and made up a new branch on my Notebook. I did some changes and then a pull request. Unfortunately my Notebook got broken and now I want to commit some changes into the PR…
user13275283
1
vote
1 answer

How to make MSBuild in Hudson signal that an ASP.NET MVC View has not been committed to SVN?

I'm using Hudson as Continuous Integration Server and Visual Studio's MSBuild build system. When I commit new code to the SVN repository, sometimes I forget to add a new view .cshtml file just added to the project. MSBuild won't catch this, that is,…
Leniel Maccaferri
  • 100,159
  • 46
  • 371
  • 480
1
vote
1 answer

When apache starts new session a strange error is throwing

Guys I need little bit help with PHP Fatal error. Whenever a new session is getting created a PHP Fatal error occurs. This error never happens throughout the session apart from when session first starts. The error is: Uncaught exception 'Exception'…
Sailab
  • 11
  • 2
1
vote
1 answer

getting denied for svn update

first i would like to say that everything was working perfectly. But i needed to update to php 5.2 so i did a yum update of my CentOS 5.5. It went well and i got my php 5.2 But... When i tried to commit a file... I got this error svn: Commit failed…
Fazoulette
  • 119
  • 6
1
vote
1 answer

Auto increment in hibernate(mysql) flush vs commit

We have one session running in per-thread which creates and processing multiple records in one table which have id as auto increment. While processing we are flushing data and at the end of thread we are committing it but if some exception occurs we…
Nikunj Aggarwal
  • 296
  • 5
  • 15
1
vote
2 answers

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 see which commit it is. I need to change one line…
Mild Fuzz
  • 29,463
  • 31
  • 100
  • 148
1
vote
0 answers

OleDbCommand with ORACLE query not updating table

I have tried everything, googled for days, but nothing I found helped me. I have Oracle 9i db, table TIME_UNITS that have several fields - for my purposes I use only 3, defined as: CODE - VARCHAR2(6), FOR_IN - VARCHAR2(1), FOR_OUT - VARCHAR2(1). My…
Alexp
  • 11
  • 3
1
vote
1 answer

Revert code changes to a specific place in time for a known set of files using git

We are working with a the NopCommerce framework. Development means that we have to include the core code as part of the build process. We have the project in a git repository. At some point, someone merged in the NopCommerce github DEV branch,…
CarComp
  • 1,929
  • 1
  • 21
  • 47