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