Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Devops
  3. Question
Devops

git reset to remote: Reset local repository branch to be just like remote repository HEAD

Asked by Asutosh Jha Apr 20, 2021 2.3K views 1 answer
Share

About this question

 How to reset local branch to remote repository?

I did:
git reset --hard HEAD
But when I run a git status,
On branch master
Changes to be committed:
  (use "git reset HEAD ..." tounstage)
   modified:   java/com/mycompany/TestContacts.java
   modified:   java/com/mycompany/TestParser.java

Can you please tell me why I have these 'modified'? I haven't touched these files? How to remove these modified.

Your answer

1 Answer

More Devops discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest DevOps Blogs

Guides, tips and career advice on DevOps from JanBask experts.