Create a local repository
Modify a file, add to stage, commit to repository
See difference between 2 versions
Create 2 files, add to stage, commit to repository, see diff
-u: only add updated files (modified or deleted)
-A: add all files
Modify 2 files, add separately to stage, commit separately to repository
Example:
1. Delete 1 file, add to stage with –u option
2. Create 1 file, add to stage with file name
3. Rename 1 file, add to stage with –A option
4. Commit all to repository
1. Delete 1 file, add to stage with –u option
2. Create 1 file, add to stage with file name
3. Rename 1 file, add to stage with –A option
4. Commit all to repository
Undo 1 change in working copy (checkout)
Undo multiple changes in working copy (reset --hard)
Undo the latest commit to staging (reset --soft)
Undo the latest commit (reset --hard)
Clean working copy (clean -n, -f)
沒有留言:
張貼留言