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 Aashish Chaursiya Nov 23, 2022 1.2K 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 modifications.

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.