2017-12-25
Onboarding day of Snap:
- Path on mac
- Find a file
- Get the usage of a folder
- Get the free spaces of a disk
- Run monitor on Mac
Need to run the monitor command from the directory of monitor with "./monitor &"
Git的常规操作:
1. 查看配置:git config --list --global/ git config --global (--local, --system) -l
2. 移除配置: git config --global (--local, --system) --unset user.name
3. 初始化仓库: git init
4. 工作区到staging区: git add
5. 查看状态: git status
6. 查看差别:
git diff
git diff HEAD -- readme.txt
7. 提交修改: git commit -m "balabala"
8. 回退操作:
git reset HEAD filename
git reset --hard HEAD^
git reset --hard 版本号
HEAD为当前版本,HEAD^为上一个版本
9. 查看log:
git log
git log --pretty=oneline
git log filename
git reflog
10.基本概念:
Working directory
Repository
Stage/Index
Master
HEAD
11. 放弃工作区的修改,回退到最后一次版本库的状态,git add或git commit
git checkout -- readme.txt