Monday, 19 December 2022

MTA project Integration with Git in Business Application Studio: HANA XSA

Today I am going to discuss about the MTA project Integration with GitHub as a source control in SAP Business Application Studio: HANA XSA. earlier I discussed integration with  Web IDE which is slide difference.

SAP Business Application studio support  Personal access tokens instead of passwords and to access GitHub repo  in a SAP Business Application Studio we need create an access token on GitHub

Before perform the steps, I want everybody know the flow and keep the diagram so that you have a clear concept on this migration –

SAP HANA Exam, SAP HANA Prep, SAP HANA Preparation, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Skills

SAP HANA Exam, SAP HANA Prep, SAP HANA Preparation, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Skills

SAP HANA Exam, SAP HANA Prep, SAP HANA Preparation, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Skills

Integration Steps: 


1. Collect of GitHub credential:  Username,Github,email if from GitHub and generate personal access tokens. Click  Developer settings -> In the left sidebar, under  Personal access  tokens -> click Fine-grained tokens. Click Generate new token. Copy the token and save the token very carefully.

SAP HANA Exam, SAP HANA Prep, SAP HANA Preparation, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Skills

SAP HANA Exam, SAP HANA Prep, SAP HANA Preparation, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Skills

2. Set up Git repo credential in Business application Studio: 

Open anew terminal and initiate the git and clone your existing repository from GitHub

SAP HANA Exam, SAP HANA Prep, SAP HANA Preparation, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Skills

SAP HANA Exam, SAP HANA Prep, SAP HANA Preparation, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Skills

The remote repository then will be available to your workspace. You can use the below commands as per requirement.

3. Pull Operation: you can use using graphical interface or use terminal to execute commands.

SAP HANA Exam, SAP HANA Prep, SAP HANA Preparation, SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Skills

Pull
git remote add projectm  https://github.com/pallabhaldar/HANA2.0.git
git pull projectm
git clone <repository url>
git fetch
git fetch -all
git checkout Branch1
git clone —-branch Branch1 <https://github.com/pallabhaldar/HANA2.0.git
git branch –Branch1 
$ git checkout -t projectm/Branch1

4. Push  Code from BAS to Git: Before Push  Pull(step) , add and commit to local repository:

git init
cd BranchL
git add -A
git commit -m “My first Commit"

Push
git remote add projectm  https://github.com/pallabhaldar/HANA2.0.git
git push -u projectm BranchL :Branch1

5. Other git command that can be useful for different operations:

git clone /path/to/repository
git clone username@host:/path/to/repository
git add <filename>
git add *
git commit -m "Commit message"
git commit -a
git push origin master
git status
git remote add origin <server>
git remote -v
git checkout -b <branchname>
git checkout <branchname>
git branch
git branch -d <branchname>
git push origin <branchname>
git push --all origin
git push origin :<branchname>
git pull
git merge <branchname>
git diff
git diff --base <filename>
git diff <sourcebranch> <targetbranch>
git add <filename>
git tag 1.0.0 <commitID>
git log
git push --tags origin
git checkout -- <filename>
git fetch origin
git reset --hard origin/master

No comments:

Post a Comment