'CM(ConfigurationManagement)'에 해당되는 글 12건

donaricano-btn

commit control


1. git reset

- restoration


1_1. To restore a feature-A

- I will restore that point and make a other branch fix-B

- after


1_2. To make a fix-B branch



1_3. git goes back to several times

- git reflog

- I can check a specific status of commit

- after


2. To solve a conflict problem

- There is a conflict issue


2_1. Confirm a README.md

- vi README.md

- HEAD : current content

- fix-B : it will be merged


2_2. commit


3. Modify commit message

- git commit --amend


3_1. Before


3_2. after


4. Handle the process that changed

- git rebase -i


4_1. Example

- There would be a spelling error about commit before Topic branch merge with master

in this case, we fix a commit and then overwrite the before commit

because spelling error is not important


4_2. Making branch feature-C


- I make a spelling error on purpose(README.md)


- If you want to commit quickly, follow the way


4_3. fix a spelling error


4_4. handle a process changed(Use the rebase)

- I have two commits, "Add feature-C" and "Fix typo"

  which means I had a mistake so I changed my source 

  I want to arrange these logs


- rebase


- I put 6748345 into a591862 


- confirm


- There is no Fix typo




 


'CM(ConfigurationManagement) > git' 카테고리의 다른 글

[git] gitignore 설정이 작동안 할 때  (0) 2018.08.01
[git] 4. Remote config  (0) 2016.05.12
[git] 2.Create a branch  (0) 2016.05.08
[git]1. Basic information  (0) 2016.05.08
블로그 이미지

리딩리드

,
donaricano-btn

Create a branch


1. Why do we use branches?

- We can handle many problems (to fix bugs, add a function etc..) at the same time


2.  git branch

- (*) is a current branch


3. git checkout -b

- Create and change

3_1. To create a feature-A branch

- Same way

git branch feature-A (Create)

git checkout feature-A (Move to feature-A from master)    

- commit as a feature-A


3_2. Change branch to master

- git checkout master

- git checkout -


4. Topic branch

- For example feature-A branch topic is about adding a new function

- One branch has a one topic


5. Merge branch

- Usually, Master branch is merge branch

 

5_1. git merge


6. git log --graph

- Check branches visually






'CM(ConfigurationManagement) > git' 카테고리의 다른 글

[git] gitignore 설정이 작동안 할 때  (0) 2018.08.01
[git] 4. Remote config  (0) 2016.05.12
[git] 3. commit control  (0) 2016.05.09
[git]1. Basic information  (0) 2016.05.08
블로그 이미지

리딩리드

,
donaricano-btn

Basic information


0. config

0_1. Config a name and E-Mail 

0_2. To read a command line easily


1. git init

- initialize a repository


2. git status

- Status of git repository

- This repository has a master branch

- There are no commit files

2_1. To make a README.md


3. git add

- add a file to stage area

- stage : Temporary area before file will be committed


4. git commit

- Record a repository status


4_1. git commit -m ''First commit"

- To write a message 


4_2. git commit  

- To write messages

- If you have a error like this

- You have to set up a editor

git  config --global core.editor "\"C:\Windows\notepad.exe\""


5. git log

- I can check a status of commit 


5_1. To print a first line

- git log --pretty=short


5_2. Show me only Folder or file log

- git log README.md


5_3. File that changed

- git log -p

- git log -p README.md


6. git diff

- Check a content that changed

- (+) is added

- (-) is deleted

6_1. git diff HEAD

- Compare status between latest commit and stage








'CM(ConfigurationManagement) > git' 카테고리의 다른 글

[git] gitignore 설정이 작동안 할 때  (0) 2018.08.01
[git] 4. Remote config  (0) 2016.05.12
[git] 3. commit control  (0) 2016.05.09
[git] 2.Create a branch  (0) 2016.05.08
블로그 이미지

리딩리드

,
donaricano-btn

SSH Key

1. Config


- id_rsa = private key

- id_rsa.pub = public key


2. registration

2_1. path

- github -> account -> New ssh key


2_2.  How to register

- cat ~/.ssh/id_rsa.pub

- add a blue part to key


2_3. confirm

- ssh -T git@github.com


- It means that you can access the github by using ssh



블로그 이미지

리딩리드

,