To download Git Bash, go to https://git-scm.com/downloads
Open up Git Bash.
Navigate to the folder where you store your repos.
cd /C/Users/lemi/source/repos/
Update repo.
git fetch
Navigate to correct branch (if needed). The current branch is in brackets beside the path.
Line 1 is to switch to an existing branch, Line 2 is if you want to create a new branch.git checkout branch-name git checkout -b new-branch-name
Set upstream branch to track remote branch.
git push -u origin branch-name
Stage files to be committed (add to git tracking). The below command add all files.
git add .
or if you have deleted files you want to stage. Otherwise, the above statement does not stage deletions:
git add -A
Commit changes.
git commit -m "message"
Push changes to remote.
git push
All changes should now be in DevOps branch.
0 Comments