Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to delete remote file locally on git

$ git checkout git checkout -- myfile
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)

nothing added to commit but untracked files present (use "git add" to track)

$ git rm myfile
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

deleted: myfile
Source by community.atlassian.com #
 
PREVIOUS NEXT
Tagged: #delete #remote #file #locally #git
ADD COMMENT
Topic
Name
5+3 =