01/05/2021 - git in vscode

git version control is essential if you are doing coding as a job
you will be working as a team, so version control is a way to track changes by each team member

you should see this, it means the editor records your changes
you can open the working tree to compare the changes side by side, and step through the changes
if not, you can use the checkout to create a new branch and it should start recording from there on




vscode git scm
 - git stash
- kinda like saving your work
- save - choose git stash untrack to track all the changes
- when you stash, your changes will disappear but can be applied with apply stash
- drop stash can be used to delete changes you no longer need
- its useful for local repo to keep various versions instead of commiting them


git commit and push
- pull to merge your changes with the remote branch, 
- to be safer, do a git fetch and then a git status to check for remote changed files so your changes dont clash i.e are in different files, then do a git pull
- to push to remote, i prefer to type the command git push origin [branch]

git checkout to 
is also very useful to store different aspects of your work. eg 1 branch 1 feature and 1 commit

Comments

Popular posts from this blog

green tea bitch

song

20231104