you dont need to reinstall you operating system jsut to get rid of git. You can delete any repo git and start anew by deleting the .git file in the repos root directory.
create a git config file .git in the current working directory
connect this repo to the online "empty" repo if starting new
1 |
git remote add origin git@github.com:USER / REPONAME.git
|
add everything in the current directory to the staging area. This would be your working branch before changes
make a comment (required)
1 |
git commit - m "first commit"
|
push staged changes
1 |
git push - u origin master
|
At this point what is in your directory is on the website. Lets assume this is working and in good shape. Now when you make a change and it could break things (dev)... Instead of doing the same thing as we just did and pushing the change to your master branch we you make a dev branch.
create a new branch called "dev" and switch to it
make your changes to your code as needed
add your changed files
make a comment
1 |
git commit - m "made a change"
|
push staged changes to branch dev
at which you should have 2 branches, master and dev on site. The git repo will show the master branch while you have a dev branch that is X commits further ahead but could be unstable.
At some point the dev will be stable and you can merge it into master.
switch to master branch
merge dev into master
push it to the site
1 |
git push - u origin master
|