# run command inside the root directory of the project to bundle including all branches
git bundle create reponame.bundle --all
# to bundle only the main branch
git bundle create reponame.bundle main
# to unbundle, use the following command
git clone reponame.bundle
# after cloning, you will see the bundle is set as default remote repository origin
git remote -v
> origin /home/user/projects/reponame.bundle (fetch)
> origin /home/user/projects/reponame.bundle (push)
# if you want to add a new remote repo as origin, you first have to remove the current origin repository, but this means loosing access to your branches etc.
git remote rm origin
# alternatively, you can provide a new name while cloning
git clone --origin <new_name> reponame.bundle
Tag: git
[Git] Branch Commands
https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
https://git-scm.com/book/en/v2/Git-Branching-Branch-Management
# create branch, switch to it and commit changes
git checkout -b hotfix
git commit -a -m 'Commit changes for fix'
# go back to main branch
git checkout main
# merge branch changes to main
git merge hotfix
# delete branch after merging, as it is not needed anymore
git branch -d hotfix
# check on which branch your are
git status
# list all branches including last commit on each branch
git branch -vv
# check which branches are already merged and which are not
git branch --merged
git branch --no-merged
# rename branche locally
git branch --move bad-branch-name corrected-branch-name
# push new name to github/gitlab
git push --set-upstream origin corrected-branch-name
# displays local and remote branches
git branch --all
# delete remote branch
git push origin --delete bad-branch-name
# push branch to remote
git push origin hotfix
[Git] Error on Windows using VSCode Dev Container
After connecting to a local dev container using Visual Studio Code and trying to clone a private project from Github I got the following error:
Cloning into 'myProject'...
warning: url has no scheme: helperselector
fatal: credential url cannot be parsed: helperselector
The only way I could remove this error was deleting the helperselector settings. So open the git config with:
git config --edit --global

and remove the the helperselector block (the first two lines). You will now get asked again for your credentials when cloning a project.
[ABAP Env] gCTS
https://blogs.sap.com/2020/05/30/sap-cloud-platform-abap-environment-lifecycle-management-introduction/
https://blogs.sap.com/2020/05/30/sap-cloud-platform-abap-environment-lifecycle-management-sample-scenarios/
Git | Git is a distributed version-control system |
CTS | Change and Transport Management System |
gCTS | Git-based CTS (the evolution of the classical CTS) |
abapGit | An open-source Git client that allows you to import existing code into your ABAP system |
Repository | A Repository is a collection of objects, their directory structure, and metadata |
Transport requests | A transport request records all the changes in your ABAP development system. With gCTS: Once a transport request is released, the changes are pushed into your central Git repository in the cloud as a commit represented by a commit ID. |