Skip to content

Commit 21315d0

Browse files
committed
README: checkout even with existing files
1 parent 63f5c33 commit 21315d0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ And run the init script. This installs the git hooks and initialize the submodul
4242
(optional) Add your remote:
4343
```
4444
git remote add origin GIT_URL
45-
git checkout -b master --track origin/master
46-
git push
45+
git push -u origin master
4746
```
4847

4948

@@ -57,14 +56,15 @@ git init /
5756
Add your remote:
5857
```sh
5958
git remote add origin GIT_URL
60-
git checkout -b master --track origin/master
59+
git fetch origin
60+
git branch --track "master" "origin/master"
6161
```
6262

6363
Use either:
6464
```sh
65-
git reset --mixed origin/master
65+
git reset --mixed && git checkout-index -a
6666
# or
67-
git reset --hard origin/master
67+
git reset --hard && git checkout-index -a
6868
```
6969
to restore your files. `--mixed` only write non-existing files. `--hard` overwrites all files.
7070

0 commit comments

Comments
 (0)