Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between commit and update?

 
manas ranjan mandal
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any body tell me what is the difference between commit and update in cvs tool?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Commit means that you are putting your local files into CVS.

Update is the other way around: getting the latest version (or another specific version) from CVS to your local machine.

For more information, see the CVS manual.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17628
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if it's any consolation, it took me long enough to learn that myself. I always thought of "updating" something as pushing out my changes to long-term storage, but in version control, that's a commit and "update" is when other people's changes get pulled into your copy.

Or in short, it's you being updated, not the project repository.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With other words, an "update" gives you what has been "committed" by everyone else since your last "update".
 
manas ranjan mandal
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you have explained me till now i think its not enough for me to gave a clear idea about update and commit.can any one give me any good and practical example for this?
Thanks in advance
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33697
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Jesper's is pretty clear, but here's a little scenario.

I start a new project and need to create a new workspace so I check out the code from CVS. Then someone tells me about the project and I go home. The next morning, I update my workspace to get all the changes that have occurred the previous day. After all, I want to start with the latest code. I code/test the method assigned to me until lunch. I update my workspace again to make sure everything works with my change. Then I commit my change so others on the team can see it.
 
manas ranjan mandal
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your example.now my doubt is cleared.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic