Error "Your push would publish a private email address"
2022-10-13
Question I'm very new to GitHub/VCS. When I try to share my project on GitHub, I get the following error message. Can't finish GitHub sharing process Successfully created project 'myproject' on GitHub, but initial push failed: remote: error: GH007: Your push would publish a private email address. failed to push some refs to 'https://github.com/me/myproject.git' I've googled the error message and got no hits. I've also searched Stack Exchange, but no cigar.…
Git push results in "Authentication Failed"
2022-10-13
Question I have been using GitHub for a little while, and I have been fine with git add, git commit, and git push, so far without any problems. Suddenly I am having an error that says: fatal: Authentication Failed In the terminal I cloned a repository, worked on a file and then I used git add to add the file to the commit log and when I did git commit, it worked fine.…
How can I save username and password in Git?
2022-10-13
Question I want to use a push and pull automatically in Git Extensions, Sourcetree or any other Git GUI without entering my username and password in a prompt, every time. So how can I save my credentials in Git? Answer Attention: This method saves the credentials in plaintext on your PC's disk. Everyone on your computer can access it, e.g. malicious NPM modules. Run git config --global credential.helper store then…
How do I add an empty directory to a Git repository?
2022-10-13
Question How do I add an empty directory (that contains no files) to a Git repository? Answer Another way to make a directory stay (almost) empty (in the repository) is to create a .gitignore file inside that directory that contains these four lines: # Ignore everything in this directory * # Except this file !.gitignore Then you don't have to get the order right the way that you have to do in m104's solution.…
Truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
2022-10-13
Question I want to filter my dataframe with an or condition to keep rows with a particular column's values that are outside the range [-0.25, 0.25]. I tried: df = df[(df['col'] < -0.25) or (df['col'] > 0.25)] But I get the error: ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all(). Answer The or and and Python statements require truth-values. For pandas, these are considered ambiguous, so you should use "…
Automatic prune with Git fetch or pull
2022-10-12
Question If someone deleted a remote branch because the work is over and I don't know, I won't do a git fetch --prune and eventually I will push back the deleted branch. Is there a viable solution for forcing Git to use the prune mode when fetching / pulling without having to specify it every time? Answer Since git 1.8.5 (Q4 2013): "git fetch" (hence "git pull" as well) learned to check "…
How to change the remote repository for a git submodule?
2022-10-12
Question I've created a git repository with a submodule in it. I'm able to tell the submodule itself to change its remote repository path, but I'm not sure how to tell the parent repository how to change the remote repository path for the submodule. I wouldn't be surprised if I'm somewhat out of luck and have to do things manually, as even deleting submodules isn't easy. Answer You should just be able to edit the .…