-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit.viki
More file actions
23 lines (17 loc) · 936 Bytes
/
Copy pathgit.viki
File metadata and controls
23 lines (17 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
* git reset note
--mixed : reset index but not working tree to specified commit
--soft : don't touch index and working tree, only move HEAD to specified commit
--hard : reset both index and working tree to specified commit
--merge : reset index and modified files in index to specified commit (don't touch other traced modified files)
--keep : reset index and no local modified files to specified commit, keep the local modified files, but
if a file that is different between the current commit and the given commit has local changes, reset is aborted.
* How can I search Git branches for a file or directory?
** git log will find it for you:
% git log --all -- somefile
commit 55d2069a092e07c56a6b4d321509ba7620664c63
Author: Dustin Sallings <dustin@spy.net>
Date: Tue Dec 16 14:16:22 2008 -0800
added some file
% git branch --contains 55d2069
otherbranch
** git ls-tree <branchname>