Skip to content

Instantly share code, notes, and snippets.

View glebovdev's full-sized avatar
💻
some open-source magic is going on

Ilya Glebov glebovdev

💻
some open-source magic is going on
View GitHub Profile
@glebovdev
glebovdev / gist:d81526a58ec7928b000c3c99720fb61a
Created October 17, 2018 19:37
git: remove directories from remote repository
# See folders that you don't have locally when doing commit?
# Here's solution that helped me:
# remove folder with all content
git rm -rf --cached path/to/the/folder
# making commit with message
git commit -m "Remove path/to/the/folder directory"
# pushing changes to remote repository
@glebovdev
glebovdev / gist:556c7655a85726cb015e91dcd64aafb7
Created August 30, 2018 18:40
Checkout master branch in an existing not empty directory
# in the folder
git init
git remote add origin [repo-url]
git fetch
git checkout origin/master -ft
Just place a file with any name (for instance, ".gitkeep") in this folder.
That's it.