• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

GIT query

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello i am using git . I am stuck in following scenario .....


Assume --> My Local Machine STATE = X
GitHub STATE = Y
Initially --> I made a pull , so X == Y

1. I made some changes in my local machine. ( My Local Machine STATE = X' )
2. I made a commit followed by push on GitHub ( Github STATE = X')
3. Now i want to revert to a state where the repository was before i made my last pull from GitHub. ( I mean i want to switch back to state X and want Github state to be Y again )

How to achieve that ??

Essentially i want to remove the following'

1. Effect of my push on github.
2. My local machine state back to the point where i started making last changes.


 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try "git reset"?
http://www.kernel.org/pub/software/scm/git/docs/git-reset.html
 
A wop bop a lu bop a womp bam boom! Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic