8

I'm coming from a perforce background, trying to understand gitHub.

In Perforce when I "checkout" something it lets other users know I am working on that file. Does checkout work the same way in Git?

It seams like you don't check out files but branches?

Thanks

Greg G
  • 697
  • 2
  • 8
  • 17
  • Checkout switches to the last commit on the given branch. It changes your files over to the versions on that branch, and makes any new commits apply to that branch. – drewmm Mar 24 '13 at 06:23
  • (Following along in a tutorial might be worthwhile.) –  Mar 24 '13 at 06:24

2 Answers2

7

checkout in Perforce would roughly equate to clone in git, but in VCS like git ( and even SVN ), the checkout doesn't signal lock to others that you are working on it. Anyone can clone a git repo and work on it without thinking about who else is working on it.

manojlds
  • 290,304
  • 63
  • 469
  • 417
4

In general, checking out a branch does not mean anyone gets notified. It simply means you are switching from one branch of code to another, potentially also creating a new branch in the process depending on your arguments.

For more info about checkout, see git checkout documentation.

Aiias
  • 4,683
  • 1
  • 18
  • 34