Site Tools


linux:general:git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:general:git [2017/12/19 16:53] lunetikklinux:general:git [Unknown date] (current) – external edit (Unknown date) 127.0.0.1
Line 4: Line 4:
 ^  Command  ^  Function  ^ ^  Command  ^  Function  ^
 |  git log --follow check_symlink  |  shows the change history of the file "check_symlink"  | |  git log --follow check_symlink  |  shows the change history of the file "check_symlink"  |
-|  git remote -v  |  verify the remote url of the current repository +|  git remote -v  |  verify the remote url (origin) of the current repository 
-      + git config --global user.email "<MAIL>"   configure your mail address  
-      + git config --global user.name "<USERNAME>"   configure your user name  
-      |+ <nowiki>git remote add origin https://github.com/<USERNAME>/<REPOSITORY>.git</nowiki>   set a new origin for your current local repository  |
  
  
Line 15: Line 15:
 #download the repository #download the repository
 git clone https://github.com/Lunetikk/check_symlink git clone https://github.com/Lunetikk/check_symlink
 +
 #change into repository #change into repository
 cd check_symlink cd check_symlink
 +
 #checkout to a temp branch #checkout to a temp branch
 git checkout --orphan temp_branch git checkout --orphan temp_branch
 +
 #add all files #add all files
 git add -A git add -A
 +
 #commit the changes #commit the changes
 git commit -am "Initial commit" git commit -am "Initial commit"
 +
 #delete the old branch "master" #delete the old branch "master"
 git branch -D master git branch -D master
 +
 #rename the temp branch to master #rename the temp branch to master
 git branch -m master git branch -m master
 +
 #copy master to remote origin #copy master to remote origin
 git push -f origin master git push -f origin master
linux/general/git.1513698795.txt.gz · Last modified: 2017/12/19 16:53 (external edit)