- Create a new repository on GitHub. You can also add a gitignore file, a readme and a licence if you want
- git init
- git add .
- git commit -m "initial commit"
- git remote add origin remote_repository_URL
- git remote -v
- git push -f origin master
git branch -d the_local_branch (or use -D to force it)
git push origin --delete the_remote_branch
git mv <old name> <new name>
Casesensitive rename: using tmp as a buffer
-
Checkout
git checkout --orphan latest_branch
-
Add all the files
git add -A
-
Commit the changes
git commit -am "commit message"
-
Delete the branch
git branch -D master
-
Rename the current branch to master
git branch -m master
-
Finally, force update your repository
git push -f origin master
git config --get remote.origin.url
git rm -r one-of-the-directories // This deletes from filesystem
git commit . -m "Remove duplicated directory"
git push origin <your-git-branch> (typically 'master', but not always)
git pull
git checkout <your_branch>
git rebase -i master
git push -f origin <your_branch]>