소스 검색

git-mv: add page

Igor Shubovych 9 년 전
부모
커밋
3839223635
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 15 0
      pages/common/git-mv.md

+ 15 - 0
pages/common/git-mv.md

@@ -0,0 +1,15 @@
+# git mv
+
+> Move or rename files and update the git index.
+
+- Move file inside the repo and add the movement to the next commit
+
+`git mv {{path/to/file}} {{new/path/to/file}}`
+
+- Rename file and add renaming to the next commit
+
+`git mv {{filename}} {{new_filename}}`
+
+- Overwrite the file in the target path if it exists
+
+`git mv --force {{file}} {{target}}`