"Git reset"의 두 판 사이의 차이

(새 문서: ==개요== ;git reset ==실습== <source lang='cli'> root@zetawiki:~# mkdir -p workspace/hello root@zetawiki:~# cd workspace/hello/ root@zetawiki:~/workspace/hello# git init Initiali...)
 
3번째 줄: 3번째 줄:


==실습==
==실습==
<source lang='cli'>
*사전작업: [[git config]], [[git init]], [[git commit]] 실습
root@zetawiki:~# mkdir -p workspace/hello
root@zetawiki:~# cd workspace/hello/
root@zetawiki:~/workspace/hello# git init
Initialized empty Git repository in /root/workspace/hello/.git/
</source>
<source lang='cli'>
root@zetawiki:~/workspace/hello# echo 'hello world' > greet.txt
root@zetawiki:~/workspace/hello# git add greet.txt
root@zetawiki:~/workspace/hello# git commit -m 'hello world!'
[master (root-commit) 0bddc05] hello world!
Committer: root <root@zetawiki.example.com>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
 
    git config --global user.name "Your Name"
    git config --global user.email you@example.com
 
After doing this, you may fix the identity used for this commit with:
 
    git commit --amend --reset-author
 
1 file changed, 1 insertion(+)
create mode 100644 greet.txt
</source>
<source lang='cli'>
<source lang='cli'>
root@zetawiki:~/workspace/hello# echo 'good morning' >> greet.txt
root@zetawiki:~/workspace/hello# echo 'good morning' >> greet.txt

2016년 3월 1일 (화) 23:52 판

1 개요

git reset

2 실습

root@zetawiki:~/workspace/hello# echo 'good morning' >> greet.txt
root@zetawiki:~/workspace/hello# git add greet.txt 
root@zetawiki:~/workspace/hello# git commit -m 'good morning!'
[master 263882e] good morning!
 Committer: root <root@zetawiki.example.com>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 1 insertion(+)
root@zetawiki:~/workspace/hello# git log
commit 263882e456d5908de1926646774b738baf5e4ab4
Author: root <root@zetawiki.example.com>
Date:   Tue Mar 1 23:05:54 2016 +0900

    good morning!

commit 0bddc0578e7d984e429f09c5c44591acb7ce5549
Author: root <root@zetawiki.example.com>
Date:   Tue Mar 1 23:05:24 2016 +0900

    hello world!

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}