Homelab, Linux, JS & ABAP (~˘▾˘)~

[Git] Branch Commands



# 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.



GitGit is a distributed version-control system
CTSChange and Transport Management System
gCTSGit-based CTS (the evolution of the classical CTS)
abapGitAn open-source Git client that allows you to import existing code into your ABAP system
RepositoryA Repository is a collection of objects, their directory structure, and metadata
Transport requestsA 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.