In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of git using tips for example analysis, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value, I believe you will have something to gain after reading this git example analysis article with tips, let's take a look at it.
1. Merge one submission of one branch to another, for example, merge a commit of dev asfdiwehfsalkdnva872383 into master
$git checkout master$ git cherry-pick asfdiwehfsalkdnva872383
The above string is a submitted commit_id, which can be viewed through git log.
two。 Merge one branch dev into another branch master
$git checkout master / / first $git merge dev on the master branch
3. View the content of a submission can be specific to a submission of the file
$git log / / Show submission information $git show / / Show files that submit all changes at one time $git show filename / / Show modifications to a file submitted at a time
4. Undo an operation, for example, I do not want to submit a modified file, and I do not want add to go back to before the modification, that is, to undo my changes.
$git checkout. / / undo all changes this time. Don't forget to click (.) $git checkout-/ undo the changes to a file.
5. Set git status highlight
$git config-global color.ui true
6. Set up automatic completion
Copy git-completion.bash to the ~ / directory and rename it to .git-completion.bash
And then execute the command.
$source. Git-completion.bash
7. Undo the most recent commit
$git reset-soft head ^
8. Delete remote and local branches
$git branch-D your_branch_name / / Delete local branch $git push origin-delete your_branch_name / / Delete remote branch
9. Take effect after modifying the .gitignore file
$git rm-r-cached. / / clear the cache $git add. / / re-trace file$ git commit-m "your comments" / / submit and comment $git push origin master / / optional, use if you need to synchronize to the remote
10. Build git warehouse
$git init-- this is the end of bare repo.git 's article on "example Analysis of git Tips". Thank you for reading! I believe you all have a certain understanding of the knowledge of "git use Tips case Analysis". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Types and methods of software testing
© 2024 shulou.com SLNews company. All rights reserved.