Using Git / Source Tree

Rename a local active Git branch from STUV-105 to STUV-68

D:\dev\myProjects\clone4\dobby-the-companion> git branch -m STUV-105 STUV-68

D:\dev\myProjects\clone4\dobby-the-companion>git status
On branch STUV-68
Changes to be committed:
  (use "git reset HEAD ..." to unstage)

        new file:   src/app/support-header/support-header.component.css
        new file:   src/app/support-header/support-header.component.html
        new file:   src/app/support-header/support-header.component.spec.ts
        new file:   src/app/support-header/support-header.component.ts

Source Tree Operation

Merge Branch feature/INFOHM-570 into develop Branch with SourceTree

  • Check out develop Branch as current Branch: Repository -> Checkout -> Select Branch develop
  • Pick out a Commit to merge into your current Branch -> select Branch/Commit: feature/INFOHM-570
SourceTree: Status after Merge
Image source_tree_img4.jpg NOT Found

Squash multiple Commits into a Single Commit


SourceTree: Status after Merge
Image source_tree_img2.jpg NOT Found


Git Operations

Change Git User Name

$ git config --global

$ git config --global "Helmut"

$ git config --global

Merging Branches

  • Merging origin/devlop Branch with local branch feature/INFOHM-563
  • A Bugfix [ origin/fix/INFOHM-567 ] was branched from our develop Branch origin/devlop
  • Before Merge: Our local branch feature/INFOHM-563 already picked up 2 Commits from origin/devlop Branch
SourceTree: Status before Merge
Image git_merge_img1.jpg  NOT Found
IntelliJ IDE: VCS -> GIT -> Merge Changes
Image git_merge_img2.jpg  NOT Found
SourceTree: Status after Merge
Image git_merge_img3.jpg  NOT Found
  • A Bugfix Branch origin/fix/INFOHM-567 was merged into our develop Branch origin/develop
  • After Merge: Our local branch feature/INFOHM-563 has now picked up 4 Commits from origin/develop Branch

How to push to upstream Repostory In Git

Manually add the upstream Repostiory

D:\dev\myTestProjects\dobby-the-companion>git remote -v
origin (fetch)
origin (push)

D:\dev\myTestProjects\dobby-the-companion>git remote add upstream

D:\dev\myTestProjects\dobby-the-companion>git remote -v
origin (fetch)
origin (push)
upstream (fetch)
upstream (push)