Skip to content

Commit fb27b20

Browse files
carusogabrielRichardLitt
authored andcommitted
Remove unnecessary anchor tags (k88hudson#200)
1 parent e0513d8 commit fb27b20

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

README.md

+1-26
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ If you want to see a file at a specific commit, you can also do this (where `<co
135135
$ git show <commitid>:filename
136136
```
137137

138-
<a name="#i-wrote-the-wrong-thing-in-a-commit-message"></a>
139138
### I wrote the wrong thing in a commit message
140139

141140
If you wrote the wrong thing and the commit has not yet been pushed, you can do the following to change the commit message:
@@ -168,7 +167,6 @@ $ git commit --amend --reset-author --no-edit
168167

169168
If you need to change all of history, see the man page for `git filter-branch`.
170169

171-
<a href="#i-want-to-remove-a-file-from-the-previous-commit"></a>
172170
### I want to remove a file from the previous commit
173171

174172
In order to remove changes for a file from the previous commit, do the following:
@@ -367,7 +365,6 @@ $ git clean -fd
367365

368366
`-x` will also remove all ignored files.
369367

370-
<a href="i-want-to-discard-specific-unstaged-changes"></a>
371368
### I want to discard specific unstaged changes
372369

373370
When you want to get rid of some, but not all changes in your working copy.
@@ -396,7 +393,6 @@ $ git stash -p
396393
$ git stash drop
397394
```
398395

399-
<a href="i-want-to-discard-specific-unstaged-files"></a>
400396
### I want to discard specific unstaged files
401397

402398
When you want to get rid of one specific file in your working copy.
@@ -411,7 +407,6 @@ Alternatively, to discard multiple files in your working copy, list them all.
411407
$ git checkout myFirstFile mySecondFile
412408
```
413409

414-
<a href="i-want-to-discard-only-my-unstaged-local-changes"></a>
415410
### I want to discard only my unstaged local changes
416411

417412
When you want to get rid of all of your unstaged local uncommitted changes
@@ -429,7 +424,7 @@ $ git clean -f
429424
```
430425

431426
## Branches
432-
<a name="i-want-to-list-all-branches"></a>
427+
433428
### I want to list all branches
434429

435430
List local branches
@@ -712,7 +707,6 @@ README.md foo.txt
712707

713708
Voila! We got our removed file back. `git reflog` is also useful when rebasing goes terribly wrong.
714709

715-
<a name="i-want-to-delete-a-branch"></a>
716710
### I want to delete a branch
717711

718712
To delete a remote branch:
@@ -739,7 +733,6 @@ To delete a local branch that *has not* been merged to the current branch or an
739733
(master)$ git branch -D my-branch
740734
```
741735

742-
<a name="i-want-to-delete-multiple-branches"></a>
743736
### I want to delete multiple branches
744737

745738
Say you want to delete all branches that start with `fix/`:
@@ -748,7 +741,6 @@ Say you want to delete all branches that start with `fix/`:
748741
(master)$ git branch | grep 'fix/' | xargs git branch -d
749742
```
750743

751-
<a name="i-want-to-rename-a-branch"></a>
752744
### I want to rename a branch
753745

754746
To rename the current (local) branch:
@@ -784,7 +776,6 @@ Switched to a new branch 'daves'
784776

785777
This will give you a local copy of the branch `daves`, and any update that has been pushed will also show up remotely.
786778

787-
<a name="i-want-to-create-a-new-remote-branch-from-current-local-one"></a>
788779
### I want to create a new remote branch from current local one
789780

790781
```sh
@@ -805,7 +796,6 @@ $ git push
805796

806797
The behavior of the other modes of ```git push``` is described in the doc of push.default.
807798

808-
<a name="i-want-to-set-a-remote-branch-as-the-upstream-for-a-local-branch"></a>
809799
### I want to set a remote branch as the upstream for a local branch
810800

811801
You can set a remote branch as the upstream for the current local branch using:
@@ -992,7 +982,6 @@ Sometimes you have several work in progress commits that you want to combine bef
992982

993983
This will do an interactive rebase that lists only the commits that you haven't already pushed, so it will be safe to reorder/fix/squash anything in the list.
994984

995-
<a name="i-need-to-abort-the-merge"></a>
996985
#### I need to abort the merge
997986

998987
Sometimes the merge can produce problems in certain files, in those cases we can use the option `abort` to abort the current conflict resolution process, and try to reconstruct the pre-merge state.
@@ -1003,7 +992,6 @@ Sometimes the merge can produce problems in certain files, in those cases we can
1003992

1004993
This command is available since Git version >= 1.7.4
1005994

1006-
<a name="check-if-all-commits-on-a-branch-are-merged"></a>
1007995
### Check if all commits on a branch are merged
1008996

1009997
To check if all commits on a branch are merged into another branch, you should diff between the heads (or any commits) of those branches:
@@ -1095,7 +1083,6 @@ If at any time you want to stop the entire rebase and go back to the original st
10951083
<a name="stashing"></a>
10961084
## Stash
10971085

1098-
<a name="stash-all-edits"></a>
10991086
### Stash all edits
11001087

11011088
To stash all the edits in your working directory
@@ -1110,7 +1097,6 @@ If you also want to stash untracked files, use `-u` option.
11101097
$ git stash -u
11111098
```
11121099

1113-
<a name="stash-specific-files"></a>
11141100
### Stash specific files
11151101

11161102
To stash only one file from your working directory
@@ -1149,10 +1135,8 @@ $ git stash apply "stash@{n}"
11491135

11501136
Here, 'n' indicates the position of the stash in the stack. The topmost stash will be position 0.
11511137

1152-
<a name="finding"></a>
11531138
## Finding
11541139

1155-
<a name="i-want-to-find-a-string-in-any-commit"></a>
11561140
### I want to find a string in any commit
11571141

11581142
To find a certain string which was introduced in any commit, you can use the following structure:
@@ -1181,7 +1165,6 @@ $ git log --committer=<name or email>
11811165

11821166
Keep in mind that author and committer are not the same. The `--author` is the person who originally wrote the code; on the other hand, the `--committer`, is the person who committed the code on behalf of the original author.
11831167

1184-
<a name="i-want-to-list-commits-containing-specific-files"></a>
11851168
### I want to list commits containing specific files
11861169

11871170
To find all commits containing a specific file you can use:
@@ -1202,7 +1185,6 @@ While using wildcards, it's useful to inform `--name-status` to see the list of
12021185
$ git log --name-status -- **/*.js
12031186
```
12041187

1205-
<a name="find-a-tag-where-a-commit-is-referenced"></a>
12061188
### Find a tag where a commit is referenced
12071189

12081190
To find all tags containing a specific commit:
@@ -1238,7 +1220,6 @@ $ git rm --cached submodulename
12381220
$ rm -rf .git/modules/submodulename
12391221
```
12401222

1241-
<a name="miscellaneous-objects"></a>
12421223
## Miscellaneous Objects
12431224

12441225
### Restore a deleted file
@@ -1255,7 +1236,6 @@ Then checkout that file:
12551236
git checkout deletingcommitid^ -- filename
12561237
```
12571238

1258-
<a name="delete-tag"></a>
12591239
### Delete tag
12601240

12611241
```sh
@@ -1280,7 +1260,6 @@ $ git update-ref refs/tags/<tag_name> <hash>
12801260

12811261
Your tag should now have been restored.
12821262

1283-
<a name="deleted-patch"></a>
12841263
### Deleted Patch
12851264

12861265
If someone has sent you a pull request on GitHub, but then deleted their original fork, you will be unable to clone their repository or to use `git am` as the [.diff, .patch](https://github.com/blog/967-github-secrets) urls become unavailable. But you can checkout the PR itself using [GitHub's special refs](https://gist.github.com/piscisaureus/3342247). To fetch the content of PR#1 into a new branch called pr_1:
@@ -1306,7 +1285,6 @@ $ git archive --format zip --output /full/path/to/zipfile.zip master
13061285
(master)$ git mv --force myfile MyFile
13071286
```
13081287

1309-
<a href="i-want-to-overwrite-local-files-when-doing-a-git-pull"></a>
13101288
### I want to overwrite local files when doing a git pull
13111289

13121290
```sh
@@ -1321,7 +1299,6 @@ $ git archive --format zip --output /full/path/to/zipfile.zip master
13211299
(master)$ git rm --cached log.txt
13221300
```
13231301

1324-
<a href="i-want-to-revert-a-file-to-a-specific-revision"></a>
13251302
### I want to revert a file to a specific revision
13261303

13271304
Assuming the hash of the commit you want is c5f567:
@@ -1402,7 +1379,6 @@ $ git config --global credential.helper 'cache --timeout=3600'
14021379
# Set the cache to timeout after 1 hour (setting is in seconds)
14031380
```
14041381

1405-
<a name="i-want-to-make-git-ignore-permissions-and-filemode-changes"></a>
14061382
### I want to make Git ignore permissions and filemode changes
14071383

14081384
```sh
@@ -1415,7 +1391,6 @@ If you want to make this the default behaviour for logged-in users, then use:
14151391
$ git config --global core.fileMode false
14161392
```
14171393

1418-
<a href="#ive-no-idea-what-i-did-wrong"></a>
14191394
## I've no idea what I did wrong
14201395

14211396
So, you're screwed - you `reset` something, or you merged the wrong branch, or you force pushed and now you can't find your commits. You know, at some point, you were doing alright, and you want to go back to some state you were at.

0 commit comments

Comments
 (0)