6

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
  • 667
  • 2
  • 7
  • 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
  • You raise several questions; I'm not sure exactly which you're asking: 1) You can enable e-mail notification when you check something in like this: http://stackoverflow.com/questions/552360/git-push-email-notification. 2) Git does *not* do locking like you're probably familiar with - for very, very good reasons: http://stackoverflow.com/questions/119444/locking-binary-files-using-git-version-control-system. 3) Git is *not* "file oriented", but rather "snapshot based": http://learn.github.com/p/intro.html. – paulsm4 Mar 24 '13 at 06:30

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
  • 275,671
  • 58
  • 453
  • 409
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,593
  • 1
  • 17
  • 33