Git Cancel Local Commit

If you want to just cancel commit, you can use this script bellow : git reset HEAD~1 But if you want to cancel and discard all changes, you can add flag --hard, this flag will also make git discard all changes you made. git reset --hard HEAD~1 Source : https://stackoverflow.com/questions/4850717/how-to-cancel-a-local-git-commit . . . selengkapnya>>

Find All Files With Same Extension

find /etc -type f -name "*.conf" Source : https://askubuntu.com/questions/333710/how-to-find-all-files-with-the-same-extension-within-a-directory   . . . selengkapnya>>

Ubuntu Search and Show Multiple Line On Text Base On Search Keyword

1. Using Grep Using grep you can do search with this format, grep -A number_of_line search_keyword file, example : grep -A 3 2016-07-13 file Command above will get 3 line from file, start from search keyword 2. Using Sed With sed you can search with this command, sed -n '/start_search_keyword/,/end_search_keyword/p' file, example : sed -n '/2016-07-13/,/2016-07-19/p'. . . selengkapnya>>

  • First
  • Previous
  • 1
  •  Next 
  • Last