Git Application Development Learning
If you do not use Git, then do not write code.
Once you use Git, SVN will not want to use up. I never go back.
Git on Mac use, and certainly can not do without the operation on the Mac right. You should use a common Linux commands to operate. Operate by a terminal.
Learn Git sure to use the command line to learn. Do not use a graphical interface to operate learning. It will greatly discount oh.
It took time to learn a thing. Be sure to get what they want like.
Course content
- Git's official website
- Common Linux Commands
- Git installation and configuration of each platform in
- Difference between distributed and centralized version control system
- Buffer, work area and submit Git
- Version rollback
- Add and delete and modify undo changes, file
- Git object type and index
- Git branch branch
- How to create, delete and branch switching
- Git branch in the role of project development
- Git branch of best practices in engineering projects
- Detailed branch common important commands
- Go Meragi
- Git conflict resolution strategies
- Detailed HEAD
- Git Commit modify Detailed
- Remote repository Introduction
- How to use a remote repository
- Git puah, pull, fetch Use and Cautions
- The basic principle Git merge
- Git aliases, config files Comments
- Git tag Detailed
- How to create a push tag
- Git feature branch Detailed
- You should use appropriate submodule
- Git subtree Detailed
- .gitignore proper use
- Git PW gitlab the building method
- Use gitlab as version control server
- Gitlab use Comments
- The idea to build Java development tools, development environment based on gradle
- Git integration with the idea of
- gradle initial use
- .gitignore Best Practices
Development tools ready.
Git's official website. https://git-scm.com/ download Git
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.
Bash own terminal system.
zsh enhanced version of bash
- Installation on my zhs
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Common Linux Commands
Common Linux Commands
Create a file: touch text.txt
To copy a file: cp text.txt
View a file: cat text.txt
Change the name of the file: mv text.txt text1.txt
Delete a file: rm text.txt
Modify a file: vi text.txt: wq save and exit.
Git a starting point.
Git GitHub Gitlab
Why use Git.
Local establishment of the repository. Local version control. Multi-host distributed collaborative work. Rewrite commit. There regret can eat. Better submit a list of relatively good difference. Better branch system. high speed.
Git operating mode
git basis
Direct recording snapshots, rather than differences in comparison
Almost all operations are performed locally.
At all times maintain data integrity.
Many operations add data only.
Three states of the file. Modified, has been staging (stage), has been submitted to (commit).
Git file: to be the repository of file management
Modified: Git modified files in the working directory
Has been staging: Staging Git perform operations on the modified file, the file is stored in the staging area.
Submitted: Git will perform the operation has been submitted to the temporary file, the file is stored in the repository.
Recommended homebrew tool on the MAC
SSH:Secure Shell
Git commonly used commands
Create a directory mkdir mygit
Get the repository
git init to initialize a warehouse version
git clone
View information
git help
View git log commit log
The difference between git diff compare files in different states
Version Management
git add to add the modified files to the staging area
git commit to commit changes
git rm delete specific files repository
Remote Collaboration
git pull pulling code to local
git push to push the distal end of the code
Other commonly used commands
Create a new file touch test.txt
cat test.txt to view this file
vi test.txt modify this file
git status to view the current status of the file branch
配置username && email**
For user.name and user.email, there are three places you can set
- etc / gitconfig (hardly used) git config --system
- ~ / .Gitconfig (for a single user, used) git config --global
- .git / config (for a particular project) git config --local
Priority 3> 2> 1
2020 January 15 22:29:52 follow-up study