-- Remove folder Gibhub (cái này sẽ xóa cả thư mục ở trên máy)

rm -rf <<folder>>
git add .
git commit -a -m "removed folder
git push origin master

-- Github Upload file

git init
git add .
git commit -m "First commit"
git remote add origin <<remote repository URL>>
git remote -v
git push -u origin master

-- Xóa đường dẫn chứa file (Muốn upload file vào đâu thì xóa rồi chèn lại)

git remote rm origin
git remote add origin <<remote repository URL>>

-- Không upload folder lên Git

git rm -r --cached <<Ten folder>>

-- Update lên github

git status
git add .
git commit -m "Update file"
git add .
git remote add origin <<remote repository URL>>     (Nếu lần trước add rồi thì giờ ko phải thêm)
git push -f origin master

-- Link hướng dẫn

https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/

-- Đổi branch

git checkout <branch>

-- Xóa tất cả commit cũ

rm -rf .git

-- Xóa branch trên máy

git branch -D <branch>

-- Xóa branch trên web

git push origin --delete <branch>

results matching ""

    No results matching ""