GIT Usage Guide

Source: Internet
Author: User

Git Proxy: Set up proxy

git config--global http.proxy proxy address

Repository Clone

git clone git address

git checkout Branchname

Work Flow:

1. Create a new branch for a feature on it, preferably on a remote repository-create locally to choose which branch to base on

2.add These changes to stage-- Select in Sourcetree to add files directly to the stage

3. temporarily modify git stash

4. switch back to the main branch update code git checkout develop, git pull

5. cut back to work branch merge latest code git checkout aa, git merge develop

6.commit them to local branch-commit-m "message"

7.push this branch to remote repository- branch created remotely with git push native branch with git push origin test-142:fix/test-142

5.raise a merge request on Gitlab to merge the new branch to develop

git architecture

Git will have two warehouses, one is a remote repository, the other is local repository

three areas of git:

Remote Repo---------------local repo-----------------local work area

git fetch from remote repo to local repo

Git Pull: from remote repo to local repo and local work area.

git branch-d xxx Delete local branch

git branch-d xxx Force Delete local branch

git branch-a View all local and remote branches

Git branch view local branch

Git stash save unstaged temporarily modified files

Git stash apply to recover stash files

git merge xxx merges the XXX branch into the current branch

GIT Usage Guide

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.