[zdudic@myworkstation project] git clone git@myrepo.domain.com.domain.com:sysadmins/mkipahome.git |
git checkout -b <new_branch> Example: [zdudic@myworkstation project] git checkout -b email-feature |
git add <new file> git commit -m "description" |
git push origin <new_branch> Example: [zdudic@myworkstation mkipahome] git push origin email-feature Counting objects: 5, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 427 bytes, done. Total 3 (delta 1), reused 0 (delta 0) remote: remote: To create a merge request for email-feature, visit: remote: https://myrepo.domain.com.domain.com/sysadmins/mkipahome/merge_requests/new?merge_request%5Bsource_branch%5D=email-feature remote: To git@myrepo.domain.com:sysadmins/mkipahome.git * [new branch] email-feature -> email-feature |
git checkout -b <new branch> git pull git@myrepo.domain.com.domain.com:sysadmins/mkipahome.git <new branch> Example [zdudic@prod-server mkipahome] git checkout -b email-feature Switched to a new branch 'email-feature' [zdudic@prod-server mkipahome] git branch * email-feature master [zdudic@prod-server mkipahome] git pull git@myrepo.domain.com.domain.com:sysadmins/mkipahome.git email-feature remote: Enumerating objects: 5, done. remote: Counting objects: 100% (5/5), done. remote: Compressing objects: 100% (3/3), done. remote: Total 3 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. From myrepo.domain.com.domain.com:sysadmins/mkipahome * branch email-feature -> FETCH_HEAD Updating ac32924..1d4856b Fast-forward mkipahome.py | 5 +++++ 1 file changed, 5 insertions(+) |
Example: [zdudic@prod-server mkipahome] git branch -d email-feature error: The branch 'email-feature' is not fully merged. If you are sure you want to delete it, run 'git branch -D email-feature'. [zdudic@prod-server mkipahome] git branch -D email-feature Deleted branch email-feature (was 1d4856b). |
git checkout master git branch git merge --no-ff <new_branch> git push Example: [zdudic@myworkstation mkipahome] git branch email-feature * master [zdudic@myworkstation mkipahome] git merge --no-ff email-feature Merge made by recursive. mkipahome.py | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) [zdudic@myworkstation mkipahome] git push Counting objects: 1, done. Writing objects: 100% (1/1), 228 bytes, done. Total 1 (delta 0), reused 0 (delta 0) To git@myrepo.domain.com:sysadmins/mkipahome.git ac32924..d93763e master -> master |
[zdudic@myworkstation mkipahome] git branch -d <new_branch> [zdudic@myworkstation mkipahome] git push origin --delete <new_branch> |
[zdudic@prod-server mkipahome] git checkout master |
[zdudic@prod-server mkipahome] git pull |
git branch -d <branch_name> |
git branch -D <branch_name> |