Fix files not tracked or deleted in cloned repository

Asked

Viewed 76 times

0

I cloned the branch of a project, upon completion some files unaccompanied by git and some with changes.

Examples:

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        deleted:    "index.htm"
        deleted:    "img/del/mix.jpg"

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        "front/sobre.html"
        "back/login.jsp"

I made some unsuccessful attempts to cancel.

git checkout --

error: pathspec 'index.htm' Did not match any file(s) known to git.

git co -f

Already on 'branch' Your branch is up to date with 'origin/branch'.

git reset --hard HEAD~1

Checking out files: 100% (58/58), done. HEAD is now at abcd123 Merge

branch 'master' of https://gitlab.com/project

into the branch

Note: Kept the changes.

1 answer

0

If you want to undo these changes do the following:

git checkout index.htm img/del/mix.jpg

will "restore" those two files, ie it will look the same when you cloned the

The archives:

    "front/sobre.html"
    "back/login.jsp"

You can delete manually as files are not being managed by git

Browser other questions tagged

You are not signed in. Login or sign up in order to post.