Git operations what Talend Studio does behind the scenes

author
Xiujun Zhang
EnrichVersion
6.4
6.3
6.2
6.1
EnrichProdName
Talend Data Management Platform
Talend Real-Time Big Data Platform
Talend Data Fabric
Talend MDM Platform
Talend Big Data Platform
Talend Data Services Platform
task
Design and Development
EnrichPlatform
Talend Studio

Git operations what Talend Studio does behind the scenes

This article outlines how your Talend Studio interacts with the GitHub when you carry out Git related operations, and gives the equivalent Git commands corresponding to the Studio actions. For more information on various Git operations in the Studio, see your Talend Studio User Guide.

When working on a Git managed project, you can carry out various Git operations to your project branches from within your Talend Studio.

Environment

This article applies to users of Talend subscription products from version 6.2 onward.

Studio actions and equivalent Git commandsIf you are working in remote mode:
When you... Talend Studio...
Save or unlock a project item, depending on the Commit mode setting in the Talend Administration Center
  1. Gets Git status.
    git status current_project_name
  2. Adds the modified files into index.
    git add file
  3. Commits changes.
    git commit -m commit_message
  4. Gets Git status.
    git status current_project_name
  5. Stashes other changes.
    git stash save -u internal_name
  6. Performs a pull.
    git pull
  7. Performs a push.
    git push
  8. Calls the JGit API to apply the stash.
  9. Drops the stash.
    git stash drop stash_id
  10. Gets Git status.
    git status
Select New Branch from the pull-down menu Creates a local branch based on the selected branch.
git branch new_branch_namebase_branch_name
Select switch from the pull-down menu
  1. Gets Git status.
    git status
  2. Deletes local tags.
    git tag -d tag_name
  3. Fetches tags from the Git server.
    git fetch -t -p
  4. Re-logs on to the project on the selected branch.
Select check out as local branch from the pull-down menu
  • If the local branch name is the same as the remote branch, creates the local branch based on the selected branch and associates the new branch with the base branch.
    git branch new_branch_namebase_branch_name --track
  • If the local branch name is different from the remote branch, creates the local branch based on the selected branch.
    git branch new_branch_namebase_branch_name
Select More > Add Tag from the pull-down menu
  1. Deletes local tags.
    git tag -d tag_name
  2. Fetches tags from the Git server.
    git fetch -t -p
  3. Calls Talend Administration Center functions to create the tag.
  4. Deletes local tags.
    git tag -d tag_name
  5. Fetches tags from the Git server.
    git fetch -t -p
If you are working in local mode:
When you... Talend Studio...
Save or unlock a project item, depending on the Commit mode setting in the Talend Administration Center
  1. Gets Git status.
    git status current_project_name
  2. Adds the modified files into index.
    git add file
  3. Commits changes.
    git commit -m commit_message
  4. Gets Git status.
    git status current_project_name
Select Push from the pull-down menu
  1. Gets Git status.
    git status
  2. Stashes other changes.
    git stash save -u internal_name
  3. Performs a pull.
    git pull
  4. Performs a push.
    git push
  5. Calls the JGit API to apply the stash.
  6. Drops the stash.
    git stash drop stash_id
  7. Gets Git status.
    git status
Select Pull And Merge Branch from the pull-down menu
  • If between local and remote branches with the same name:
    1. Gets Git status.
      git status
    2. Stashes other changes.
      git stash save -u internal_name
    3. Performs a pull.
      git pull
    4. Calls the JGit API to apply the stash.
    5. Drops the stash.
      git stash drop stash_id
    6. Gets Git status.
      git status
    7. Deletes local tags.
      git tag -d tag_name
    8. Fetches tags from the Git server.
      git fetch -t -p
  • If between branches with different names: performs a merge.
    git merge selected_branch
Select New Branch from the pull-down menu Creates a local branch based on the selected branch.
git branch new_branch_namebase_branch_name
Select switch from the pull-down menu
  1. Gets Git status.
    git status
  2. Re-logs on to the project on the selected branch.
Select check out as local branch from the pull-down menu
  • If the local branch name is the same as the remote branch, creates the local branch based on the selected branch and associates the new branch with the base branch.
    git branch new_branch_namebase_branch_name --track
  • If the local branch name is different from the remote branch, creates the local branch based on the selected branch.
    git branch new_branch_namebase_branch_name
Select More > Add Tag from the pull-down menu
  1. Deletes local tags.
    git tag -d tag_name
  2. Fetches tags from the Git server.
    git fetch -t -p
  3. Calls Talend Administration Center functions to create the tag.
  4. Deletes local tags.
    git tag -d tag_name
  5. Fetches tags from the Git server.
    git fetch -t -p
Select More > Reset from the pull-down menu Performs a reset to the current branch.
git reset --hard origin/branch_name