19

I am working with some version control software. One of the things you can do with this software is to "check out a version" of a program's code. This is the exact phrasing:

"Check-out a branch (of the master code) into a local repository: When working in your local repository, you may want to check out and work on branch code rather than the main code line."

Can anyone tell me the meaning of "check out" in this context?

The common meanings of check out don't seem to fit...

6
  • 9
    Isn't this question better suited to another SE site (i.e. this one) where the term's meaning in jargon is understood? Aug 30, 2016 at 19:59
  • 2
    @P.E.Dant - I'd bet a box of doughnuts programmers.se would through it back over here, or to ELU ;-P The two answers standing as of this comment are excellent as 'checkout' ... 'code' is essentially the same as checkout a book. Aug 30, 2016 at 23:48
  • Peter's wasn't there when I commented. The question is still specific to programming, and not to learning English it seems to me. Aug 31, 2016 at 0:19
  • 3
    @P.E.Dant ... hmmm, it's one of those questions that straddle the boundaries. If you 've been exposed to some programming, which I suspect a lot of us here have been, then I'd say the question should land in ELL. If you don't know the jargon, then it might appear to belong in the lands where the jargon lives. I guess the key here is "phrase" or "meaning of" ... he's not asking how it works, rather the meaning of the English. (It would be interesting to see what would happen if it was flipped over to programmers.se. Wanna bet me that box of doughnuts ? :p) Aug 31, 2016 at 0:58
  • 3
    No talking about doughnuts! Anything related to food belongs in cooking.stackexchange.com. Words that refer to food are not part of English! Aug 31, 2016 at 18:31

5 Answers 5

37

"Checking out" an item usually means borrowing it in a way that records that you are the one who borrowed it. "Checking in" is returning the item and also records that fact. So at any time you know who is recorded as being in possession of the item. Library books are an example that is familiar to everyone but in some environments many other items may be checked out and back in.

Early version control systems also worked like this. To avoid two people modifying the same file at the same time you would "check it out" before starting modifications and "check it in" when your modifications were done.

Later version control systems moved away from this model. Instead of trying to block people from modifying the same file at the same time they accepted that it would happen and dealt with merging the results afterwards. Nevertheless the terms "check out" and "check in" stuck around.

8
  • 1
    "you know how is recorded as being in possetion of the item". 'Who', not 'how' and 'possession', not 'possetion'. (I couldn't suggest an edit for it was too short) Aug 31, 2016 at 8:21
  • Check In is sometimes replaced with "Commit".
    – Zikato
    Aug 31, 2016 at 10:35
  • 1
    I believe the analogy is not entirely correct. In fact, with VCS (version control systems) you check out by cloning a file and you work on the local copy. This doesn't mean you are the only one who can access that file in the repository or write on it, it just means you work on your local copy. Other people could check their copy in before you. Aug 31, 2016 at 15:39
  • 1
    Version control software such as SVN or Visual Sourcesafe can be configured to lock a file in a repository when someone is working on their local copy. It depends on how it's configured. If locking is switched on, nobody can commit their changes if another developer has the file "checked out". It's not true that "later version control systems moved away from this model"; they simply introduced the functionality to toggle whether it works this way or not. Aug 31, 2016 at 15:51
  • 1
    @AndreaLazzarotto Before distributed version control systems, checking out a file literally locked it until the file was checked back in by the user or an admin overrode the lock. During that time, nobody could check in changes to the file. Aug 31, 2016 at 20:44
19

It's confusing, because check has many, many meanings, but the definition is basically this:

49 f : to borrow (an item) by having it listed as one's temporary responsibility: The adding machine was checked out in your name.

or this:

check out 2. To withdraw (an item) after recording the withdrawal: check out books.

Probably the most common usage of "check out" in this sense is taking out books from the library: to check out a book from the library is to borrow it, and have the act of borrowing be recorded. This sense has been extended to other things - in the case of version control software, you're not literally borrowing the code, but metaphorically you're doing the same thing.

2
  • 12
    I would add that "check out" in this context likely originated in version control systems where "checking out" meant a person had a lock on a file and was the only one who could change it until they released the lock (much like no one else can read the book while you have it checked out). Modern systems don't typically have that model, but the term often remains.
    – eques
    Aug 30, 2016 at 20:18
  • 1
    @eques In RCS, one of the earliest version control systems, the check out command, co, just meant you were getting a copy of a version (defaulting to the head of the main branch) of a particular file. This was marked read-only. You had to specifically check out with lock, co -l ..., if you were intending to modify (a version of) the file and put in back into the repository. The lock (though breakable in emergencies) was intended to cut down the unmitigated joy of code merging.
    – Simon F
    Aug 31, 2016 at 9:21
1

It means to make a copy of that file or directory locally for doing some editing. The editing won't affect the original file until you check it back in. Then when you check it back everyone will have the changes.

Used in Version Control Systems such as Git.

0

In the versioning application Team Foundation Server, there are two terms with similar words:

  • Check In: Put your edited files into server.
  • Check Out: Get the latest update for each files on server.

Since the versioning application is usually used by team (several persons). So while they edit some file, we can retrieve the latest version of that file.

1
  • 2
    I do not see what, if anything, this adds to the earlier answers. Aug 31, 2016 at 22:48
-2

When a file is checked out to you, you are the only one allowed making changes to it. The file will remain locked (checked-out) until you release it. Admins with correct privileges can discard the checked-out lock made by a user.

2
  • 2
    This answer looks like it was copy and pasted from the documentation for one peice of software without giving attribution or context and without mentioning that software development has largely moved away from the "exclusive checkout" model. Aug 31, 2016 at 12:09
  • You might want to upgrade from SourceSafe.
    – Nic Bell
    Aug 31, 2016 at 14:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .