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
2 answers

How to use transactions in cakephp?

I'm trying to use commit with setConnection() but it doesn't work... I have no idea how to make the transaction work in cakephp I found in the documentation this: https://book.cakephp.org/3.0/en/orm/database-basics.html#using-transactions but I…
1
vote
1 answer

How to roll back to a certain commit?

I have a list of commits. Need to roll back to some fit & upd (97f962f143b136d0d6dcbdfc02afc8253c767d7f). Need to do this so that all files that have been created in subsequent commits are deleted. git checkout…
user11301070
1
vote
1 answer

How get source code of files in a commit with GitPython?

I need to get source codes for all files in a commit. Currently I am using Pydriller and it works well. But for performance reasons I need to use GitPython. I have tried this solution: repo = Repo('path to repo') ) commit = repo.commit('my…
1
vote
0 answers

In git my master is some commits ahead the development branch

My master branch is 22 commits ahead of development though I always rebase my master from development when I make a release. When I now merge the master in development these commits are merged but no file has changed In detail: My workflow for…
Jochen Kunze
  • 583
  • 1
  • 5
  • 17
1
vote
1 answer

Tools for remote git commits?

I have a webserver for development. All changes in source files which occur there are made through the ftp. After changes have been made I ought to connect through ssh and to make the commit from console. (It's not possible to have the local copy of…
Yuri G.
  • 47
  • 1
  • 5
1
vote
4 answers

Multiple SVN users with the same login credentials on a Unix machine

Here's our usecase for small projectets that rarely require attention from multiple developers at the same time: Projects are on a shared Ubuntu dev server Shared office account used to access the actual dev server Developers have their own SVN…
red
  • 1,980
  • 1
  • 15
  • 26
1
vote
2 answers

How to remove sensitive information before "git push"

My python application has database keys/api keys on source code. Something like: db_key = XXXXXXXXXXXX api_token = XXXXXXXXXXXX ... I want to remove this keys automatically (Not the entire file) before commiting/pushing to git. Also, I want to…
krrrr0
  • 29
  • 2
  • 5
1
vote
2 answers

TortoiseHg: cannot commit without an active bookmark

I created a new Folder I put some files in it I created a new Mercurial repository in this Folder I tried to commit all files using TortoiseHg Until this Point I did this Scenario quite often. But this time i get an error message cannot commit…
Michael Hutter
  • 1,064
  • 13
  • 33
1
vote
1 answer

A is not known to exist in the repository and is not part of the commit, yet its child B is part of commit

Unable to commit a directory as part of changelist. If I do svn commit --changelist MYCHANGELIST -m "MYMESSAGE" I get 'A' is not known to exist in the repository and is not part of the commit, yet its child 'A/myfile.cpp' is part of the commit If…
Dims
  • 47,675
  • 117
  • 331
  • 600
1
vote
2 answers

How to commit group transaction to a stored procedure in oracle

I have a procedure that inserts data to a table and has a commit statement at the end. It commits each call to the procedure and inserts data. create or replace procedure abc begin insert stmt; commit; end; Now, I wonder if there is a way I…
Ragnarok
  • 13
  • 3
1
vote
0 answers

Error handling along with roll back and commit option with error message in MySQL

I have a stored procedure, which has handlers with flag for roll back, how do I get the error message from the handler. I have declared handlers for various exception along with flag for roll back as shown below. ... BEGIN DECLARE `_rollback` BOOL…
1
vote
0 answers

Multiple commits on single file

I have a File with 10 logical changes I want to commit the file for each line that is per line per commit, to have a complete understanding of the line added or changed to the other Engineer
Malik
  • 121
  • 1
  • 1
  • 17
1
vote
1 answer

How can I get the commits between the last release and the current snapshot version?

I would like to get the commits between the last release and the current snapshot version without specifying the last release. Currently I have the following command: git log 1.2.3..HEAD Is there a generic reference to the last release?
Bionix1441
  • 2,135
  • 1
  • 30
  • 65
1
vote
1 answer

What happens if transaction.Rollback/Commit never called in before closing the connection?

What happens if transaction.Rollback/Commit never called in before closing the connection ? public DBStatus InsertUpdateUserProfile(Int64 UserID, W_User_Profile oUser) { MySqlConnection oMySQLConnecion = null; MySqlTransaction tr = null; …
PCG
  • 2,049
  • 5
  • 24
  • 42
1
vote
0 answers

Azure DevOps + Version Control Integration

Using Azure DevOps as a way to track progress in development lifecycle but I don't want to manually have to move the tickets from "To Do" -> "In Progress" -> "Test" -> "Done". I would like this to happen when I work on some code and commit a…
Nicholas
  • 125
  • 2
  • 12
1 2 3
99
100