• Skip to primary navigation
  • Skip to content
  • Skip to footer
Arshad Mehmood Arshad Mehmood Software Engineer • Tech Enthusiast
  • About
  • Today I Learned
  • Portfolio
  • Resources
  • Newsletter
  • Contact
    1. Home
    2. /
    3. Today i learned
    4. /
    5. Git
    6. /
    7. Ignore local commits and pull repository from the remote branch
    Arshad Mehmood

    Arshad Mehmood

    Software Engineer, DevOps Enthusiast, and Android Developer. M.Sc. Business Informatics from University of Mannheim. Building scalable solutions and sharing knowledge.

    • Mannheim, Germany
    • My Android Apps
    • LinkedIn
    • GitHub
    • Twitter
    • Instagram

    Ignore local commits and pull repository from the remote branch

    less than 1 minute read

    Ignore local commits and pull repository from the remote branch

    Just ignore the local commits and pull from the branch!

    Reset:

    git reset --hard origin/master
    

    Pull changes

    git pull origin master
    

    Share on

    X Facebook LinkedIn Bluesky

    Leave a comment

    • Follow:
    • Twitter
    • GitHub
    • Instagram
    • Feed
    © 2025 Arshad Mehmood. Powered by Jekyll & Minimal Mistakes.