Search
 
SCRIPT & CODE EXAMPLE
 

PHP

git reset head 3 . how to back git init

$ git init
Initialized empty Git repository in .git/

$ echo "testing reset" > file1
$ git add file1
$ git commit -m 'added file1'
Created initial commit 1a75c1d: added file1
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file1

$ echo "added new file" > file2
$ git add file2
$ git commit -m 'added file2'
Created commit f6e5064: added file2
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file2

$ git reset --hard HEAD^
HEAD is now at 1a75c1d... added file1

$ cat file2
cat: file2: No such file or directory

$ git reflog
1a75c1d... HEAD@{0}: reset --hard HEAD^: updating HEAD
f6e5064... HEAD@{1}: commit: added file2

$ git reset --hard f6e5064
HEAD is now at f6e5064... added file2

$ cat file2
added new file
Comment

PREVIOUS NEXT
Code Example
Php :: Simple factory Design pattern in PHP 
Php :: laravel migration mediumtext length 
Php :: cmd run php file 
Php :: php thread safe or non thread safe 
Php :: Regex to remove span tags using php [duplicate] 
Php :: htaccess new date timestamp 
Php :: how to login first before see index php 
Php :: change default route laravel 
Php :: wordpress highlight text excerpt 
Php :: Generating Random String In PHP Using random_bytes() function. (Cryptographically Secure) 
Php :: symfony request type 
Php :: validar tipo de imagen php 
Php :: php strip url of all invalid characters 
Php :: laravel pagination get items array 
Php :: no cache hummingbird 
Php :: like query with prepare wordpress 
Php :: laravel get data from model to controller 
Php :: how to back the page laravel where the scorll is 
Php :: is search page wordpress dev 
Php :: php date now 
Php :: get month days in php 
Php :: laravel withwhere 
Php :: run new oroject laravel with idff port 
Php :: php current page 
Php :: check url parameter if not redirect wordpress 
Php :: create a table using query 
Php :: sum of each group in laravel 
Php :: drupal form show description 
Php :: Fetch pivot data laravel 
Php :: phph call functions from other .php file 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =