testing - Git workflow: commit != OS save -
i unclear on how git supposed work. have looked @ official docs, , many tutorials, have not seen answer question.
when have new feature or bug fix want work on, , create branch purpose, supposed interim files while work in progress? git saving 'snapshots' of various versions of working files. in order see if of edits work or worth keeping, have test them. , can't test them without them being saved disk operating system. once have saved these files, not 'snapshots', how git save or restore original condition of master once files on disk have been 'permanently' saved in order run , tested?
there must answer, haven't found it. tutorial have found references saving os http://ryanflorence.com/git-for-beginners/, , in reference merge conflict.
you may conflating commit hard-disk save. can't commit isn't saved, true in vcs; can't version hasn't been written file yet.
git considers what's been changed snapshot, in sense start initial file may large, git ever bother keeping track of changes happened between versions. if part of file touched, part of file updated.
here's sample a repository i'm working on. i'm using intellij, bold shas recent change.
if wanted move file specific point, could. notice also, there lot of things haven't changed since november '14 (and few changes exist since may), there definite changes since then. what's meant when snapshots being kept opposed entire versions of files. if wanted reintroduce version of file in may '14, i'd need instruct git check out 5c5f896b.
the end result see entire file @ instant. means amalgam of of commits on last few months (or years). still snapshot because ever consider recent changes file.
...git thinks of data more set of snapshots of miniature filesystem. every time commit, or save state of project in git, takes picture of files @ moment , stores reference snapshot. efficient, if files have not changed, git doesn’t store file again, link previous identical file has stored. git thinks data more stream of snapshots.
the more git, you'll discover approach allows go "known working states", or keep multiple versions of same code in same repository. part, discover with bit of reading , hands-on exercises.
Comments
Post a Comment