git - May I list the files of the current commit? -
imagine everytime commit files, before push them, i'd list them check. how may ?
i tried:
git ls-tree -r --name-only master git ls-files -stage
if edit single file, add
commit
it. if try above codes, shows me files.
i want list files pushed on current commit.
git diff rescue on one. you'll use --name-only
flag. contents of current commit, use command:
#before stage git diff --name-only #staged changes before committing git diff --name-only --cached #after committing git diff --name-only head^ head
if want see files pushing if there more 1 commit, you'll need specify current branch head , head on remote
git diff --name-only remote/branch branch
Comments
Post a Comment