[Tfs4]tfs git address, branching concept

Source: Internet
Author: User
Tags how to use git

1) upload local code to TFS

A.generate git Credentials, which is to create a git account password

b) Upload Local code

git add *
Git commit-m "into management"

Git remote add Origin https://qiongyan2.visualstudio.com/_git/BeibeiCore2
Git push-u origin--all
{{-u reference link: https://www.zhihu.com/question/20019419/answer/83091592}}
Git remote RM origin
Username for ' https://qiongyan2.visualstudio.com ': [email protected]
Password for ' https://[email protected] @qiongyan2. visualstudio.com ':
2) Git branch

You can also refer to this article: Git best practices in the team-how to use git Flow correctly

Khowarizmi
Links: https://www.zhihu.com/question/21995370/answer/33172036
Source: Know
Copyright belongs to the author, please contact the author for authorization.

Write in front:
1. It is recommended to use the source tree or other GUI tools.
2. Installing Oh-my-zsh
Start answering questions:
Recently, looking at Git's management of branches, I found that we can use Git-flow to manage branches. First put the project address Nvie/gitflow GitHub
Git-flow mainly has 5 branches: Master, Hotfix, release, develop, feature.

The feature branch begins at the develop branch and is then merged into the develop branch after completion.

When a certain number of feature branches have been completed and a release branch is opened from develop, these features will be updated to the next released version, and the subsequent feature will not be merged into release.

Then in the release branch, just modify the bug and complete the release branch. Completing the release branch completes the following three actions: 1. Merge release branches to master;2, label master with version, 3, release to develop branch.

When a bug is found on master, a hotfix is opened and merged into the master branch after completion.

The basic development process is this, it is unclear to see the document Gitflow Workflow

Ps:source Tree has integrated git-flow using feel good 3) Git Flow code example
A. Creating develop branch git branch Developgit push-u origin develop    B. Start a new feature development git checkout-b some-feature develop# Optionally, push branch to Origin:git push-u Origin some-feature # make some changes git statusgit add Some-filegit commit C. Complete Featuregit pull Origin developgit checkout developgit Merge- -no-ff Some-featuregit push Origin developgit branch-d some-feature# If you pushed branch to Origin:git push Origin--del Ete some-feature D. Start relasegit checkout-b release-0.1.0 develop# optional:bump version number, commit# Prepare Relea SE, Commite.  Complete Releasegit Checkout mastergit merge--no-ff release-0.1.0git pushgit checkout developgit merge--no-ff Release-0.1.0git Pushgit branch-d release-0.1.0# If you pushed branch to Origin:git push Origin--delete release-0.1.0 git tag-a v0.1. 0 mastergit push--TAGSF. Start Hotfixgit checkout-b hotfix-0.1.1 Master G. Complete hotfixgit checkout mastergit merge--no-ff hotfix-0.1.1git pushgit che Ckout developgit Merge--no-ff hotfix-0.1.1git pushgit branch-d hotfix-0.1.1git tag-a v0.1.1 mastergit PusH--tags 
4) test git flow locally

Books Catalog: Https://git-scm.com/book/zh/v2

Qiongyazhudembp:beibeicore qiongyanzhu$ git branch--allMaster  remotes/origin/master Qiongyazhudembp:beibeicore qiongyanzhu$

  

$ git branch develop$ git branch--all  develop* Master  remotes/origin/master 

You can also synchronize

$ git push-u origin develop:developtotal 0 (Delta 0), reused 0 (Delta 0) to Https://qiongyan2.visualstudio.com/_git/Beibei Core2 * [New branch]      Develop-Developbranch develop set up to track remote branch develop from origin.$ git branc H--all  master  remotes/origin/develop  remotes/origin/master 

Develop  Master  remotes/origin/develop  remotes/origin/master

Remote If you already have a develop branch

5) Coding error, Discard workspace modification

$ git diff workspace compared to staging area (submit staging area, stage)

$ git checkout bootstrap.js

[Tfs4]tfs git address, branching concept

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.