An analysis of git command usage on eclipse

Source: Internet
Author: User
Tags java web

an analysis of git command usage on Eclipse2016-03-31 14:44

There are a lot of articles about git installation and building code warehouses on eclipse, but as a beginner git, you want to understand the role of each command.

    • When the project is connected to the code base, we can right-click on the project to->team some of the actions on Git, using the following step-by-step instructions.

    • commit(Submit): Click will appear the following interface, commit message input the information you submitted, generally do what changes and work, the project owner and the submitter will be automatically generated. The following files choose which you have made the modified file to submit (note here the configuration of your. gitigonre file, and if not, create a new one to add the appropriate filtering rules, generally speaking. class files are not submitted, otherwise there will be conflicts when others commit). The last commit and push is to push the commit to the local repository while pushing it to the repository on the server, and commit is to save the local modifications to the local repository.

  • stashes(storage): For example, today's test found that I submitted the code yesterday there is a bug, but I came to do some new features today, testing and let me fix the bug immediately, there is no way to fix the bug only. Then the stashes command is useful, it will store the work done today in the buffer, the working directory and the contents of the index back to the last commit state, then I can modify the bug. After the modification, I submit the project to another version to test, and then I find the corresponding node of my stashes to restore my working directory, continue to write my things today.

  • push to Upstream (push to remote branch): First explain what the next upstream is, for example, I have a new branch A in the local repository, push the code to branch B of the remote repository, then branch B is the upstream of branch A, whereas branch A is the downstream of branch B.

  • Fetch from Upstream (Pull remote Repository branch to local): Upstream said, we say that the difference between fetch and pull, is pulled from the remote repository, fetch directly get the latest version does not merge, and pull is to get the latest version and merge to Local. In short, pull = fetch + Merge.

  • Push branch ' master ' (push to Master Branch): Each commit in a Git implementation holds a commit object that contains 0 or more (the first commit without a parent) pointer to the object, contains a pointer to the staging content, and related ancillary information such as the author, time, and so on for the submission. Git uses master as the default name for the branch.

  • Pull (pulls the remote repository branch to local and merges with the local branch): It is recommended that less pull and more Fetch and Merge,pull will hide a lot of details, which is not conducive to understanding the structure at the same time it is not easy to find the wrong place.

  • Remote/push (push to remote code base): The remote command is used to manage a remoting host, and tag refers to a particular state of a branch at a time, and is typically used to mark the version number. The following two need to be configured when the remote code base address changes.

    • Merge (merge): Merges the contents of other branches into the current branch.

    • rebase (Modify merge): Merges a branch modification into the current branch. Here is the difference between merge and rebase: Merge is a direct merge branch, and if there is a conflict, it is resolved after completion. Rebase are merged by Time line, if there is a conflict, you will be prompted to deal with, handled well can continue until rebase complete, if the conflict is not good can discard rebase or skip.

    • Reset (backtracking): You can switch the current branch to any previous version state of this branch.

    • Patch (patch): Generate file comparison information, either through diff (apply) generated standard patch, or using format-patch generated git special patch.

    • index(staging area): Is a directory tree that contains file indexes that record information about files such as file name, status, timestamp, length, and so on. Add the file to index when you are finished resolving the git conflict.

no MAVEN-no project-quickly build MAVEN projects with Eclipsehttp://www.itnose.net/detail/6325978.html

Diagram using Eclipse to upload Java Web project to [email protected] http://jingyan.baidu.com/article/676629977f8bb454d51b8486.htmlJava Jersey Usage Summary

http://blog.csdn.net/u010395804/article/details/38398149

An analysis of git command usage on eclipse

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.