'git'에 해당되는 글 2건

  1. 2016.11.02 [GitLab] SSH Key
  2. 2015.07.18 [git] 간단 사용법
2016. 11. 2. 17:57

When you create a project on Gitlab, you have to set ssh key on it.

Let's see how to set on the page.


1. Create public SSH Key

 - by git bash

 - by PuttyGen

   1) Download PuttyGen

   2) Click Generate button and rolling mouse on the application

   3) Copy the SSH Key on the red box (public key)

2. Register SSH Key on GitLab

  Move to "Profile Settings" page

"Click SSH Keys" Link

Paste the SSH Key that you copied on the textbox that it has been created


※ PrivateKey has to be kept for push and pull command. In SourceTree, PrivateKey can be set as below.




Posted by CoolDragon
2015. 7. 18. 04:09

git status

git add <filename.확장자>

git rm <filename.확장자>

git commit -m "내용"



git checkout -b <branch name> -- create branch

git checkout <branch name> -- move to branch


git branch -- shows branch list and current using branch

git branch -m <branch name> <new branch name>  -- change branch name

git branch -d <branch name> -- delete branch


 

git push origin master

  - git remote add origin <원격서버주소>

git pull origin master

 

 

gitk& -- see commit history

git merge --no-ff <branch name A> -- for example, while using B branch, A branch applies new changes to B

 

c:> git checkout -p <branch name A> somecode.js -- only one file merge from branch name A to B

출처: <http://stackoverflow.com/questions/13711455/how-can-i-merge-a-specific-file-from-one-branch-into-another-branch-in-git>


Posted by CoolDragon