Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between commit and update?

 
manas ranjan mandal
Ranch Hand
Posts: 97
  • 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
Posts: 15214
36
Android IntelliJ IDE Java Scala Spring
  • 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: 18094
48
Android Eclipse IDE Linux
  • 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
  • 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
  • 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: 34178
340
Eclipse IDE Java VI Editor
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your example.now my doubt is cleared.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic