August 2019
Beginner to intermediate
798 pages
17h 2m
English
When you add or remove one or more files from a repository, git(1) should know about it from you. You can delete a file named a_file.go as follows:
$ rm a_file.go $ git rm a_file.go rm 'ch07/a_file.go'
Executing git status at this point will generate the following kind of output:
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: a_file.go
For changes to take effect you will need to git commit first and git push afterwards:
$ git commit -a -m "Deleting a_file.go" [master 1b06700] Deleting a_file.go 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ch07/a_file.go $ git push Enumerating objects: 5, done. ...
Read now
Unlock full access