QuallityControll / Alexa_Skills

Skills for Alexa
0 stars 0 forks source link

Git/Github notes #2

Open sanjanacheerla opened 7 years ago

sanjanacheerla commented 7 years ago

Local - everything is local - unless you push pull or clone

Default branch - default name -"master"

Remote repository - default name "origin"

  1. When you clone it is in your local computer, get all of commits that most up to date stuff. If a change was made to a file(ex - a.py, b.py, c.py:

if someone else was changing the files in the repository and pushed it on the repository, when you go to push your from local to remote (so before you push you have to update(git pull) the remote and then push(git pull) it)

  1. now someone else clones it and changes a.py and pushes it then you make a different change to a.py and you commit to your repository - now if you want everyone else to see it you have to push it to origin - error messages - merge conflict

Branches instead of committing changes to the master branch you create tour own branch in that repository git checkout -to "database" <-- command to create a branch now if you add files it will commit to a different branch doesn't overwrite master instead puts it to the side ex - git push origin database instead of git push origin master git checkout master - all files vanish from your directory git checkout "" - change between branches git checkout database - resume work on database head - state of directory reflected

if you want to merge 2 branches (database and master) git merge database when your head is in master - merges branch into master now master has its history up to date with both of the branches git merge master when head is in database - merges master into branch - good if u want to change or test stuff

deleting branch does not delete commit history, if you want to delete a file you have to delete the commit = nasty :( don't do it