git-bash

How to remove a directory from git repository?

孤街浪徒 提交于 2019-11-26 02:02:46
问题 I have 2 directories on my GitHub repository. I\'d like to delete one of them. How could I do that without deleting and re-creating entire repository? 回答1: Remove directory from git and local You could checkout 'master' with both directories; git rm -r one-of-the-directories git commit -m "Remove duplicated directory" git push origin <your-git-branch> (typically 'master', but not always) Remove directory from git but NOT local As mentioned in the comments, what you usually want to do is

Python not working in the command line of git bash

大兔子大兔子 提交于 2019-11-26 01:11:11
问题 Python will not run in git bash (Windows). When I type python in the command line, it takes me to a blank line without saying that it has entered python 2.7.10 like its does in Powershell. It doesn\'t give me an error message, but python just doesn\'t run. I have already made sure the environmental variables in PATH included c:\\python27 . What else can I check? A session wherein this issue occurs looks like the following: user@hostname MINGW64 ~ $ type python python is /c/Python27/python

Ignoring directories in Git repos on Windows

懵懂的女人 提交于 2019-11-25 20:04:00
How can I ignore directories or folders in Git using msysgit on Windows? stew Create a file named .gitignore in your project's directory. Ignore directories by entering the directory name into the file (with a slash appended): dir_to_ignore/ More info here . brainwavedave By default windows explorer will display .gitignore when in-fact the file name is .gitignore.txt Git will not use .gitignore.txt And you can't rename the file to .gitignore because explorer thinks its a file of type gitignore with no name. Non command line solution: You can rename a file to ".gitignore." and it will create "