When and how to use git reset.
Case 1:
You have commited changes, but not yet pushed it. (never reset shared (pushed) commits, read this)
AND
You want to undo this commit and continue to work on these changes in it.
git reset --soft HEAD~1
Case 2:
You have commited changes, but not yet pushed it. (never reset shared (pushed) commits, read this)
AND
You want to undo this commit and DO NOT WANT to continue to work on these changes in it.
git reset --hard HEAD~1
In this case all changes of this commit will be lost and you will not see it in your Local Changes list (e.g. in InteleJIdea IDE)
HEAD~1 means 'one commit from HEAD'
Wednesday, September 30, 2015
Tuesday, September 29, 2015
Friday, September 25, 2015
Thursday, September 24, 2015
Tuesday, September 22, 2015
THREAD - how to stop running thread
private volatile Thread blinker; public void stop() { blinker = null; } public void run() { Thread thisThread = Thread.currentThread(); while (blinker == thisThread) { try { Thread.sleep(interval); } catch (InterruptedException e){ } repaint(); } }
http://docs.oracle.com/javase/7/docs/technotes/guides/concurrency/threadPrimitiveDeprecation.html
Tuesday, September 15, 2015
Monday, September 14, 2015
Saturday, September 12, 2015
Friday, September 11, 2015
JAVA - understannding recursion in conjunction with JVM stack
http://www.javamex.com/tutorials/techniques/recursion_how.shtml
Thursday, September 10, 2015
MONGO_DB: Thinking in Documents presentation
Basic things about MongoDD - Thinking in Documents
Slides: http://goo.gl/4d59xS
Video: https://goo.gl/CgG2VR
Slides: http://goo.gl/4d59xS
Video: https://goo.gl/CgG2VR
Wednesday, September 9, 2015
Subscribe to:
Posts (Atom)