How to git add a whole folder

My guess is that you are trying to add folder while you already are in folder. Instead, add everything in the folder, rather than the folder itself: To your other question, adding whole folders is fine, but only relevant when adding sub-folders. Again, you can’t git add the folder that is your repository (my_folder above). The usual way to add everything in … Read more

Stash just a single file

I think stash -p is probably the choice you want, but just in case you run into other even more tricky things in the future, remember that: Stash is really just a very simple alternative to the only slightly more complex branch sets. Stash is very useful for moving things around quickly, but you can accomplish more complex things with … Read more

How do I update or sync a forked repository on GitHub?

In your local clone of your forked repository, you can add the original GitHub repository as a “remote”. (“Remotes” are like nicknames for the URLs of repositories – origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms … Read more

Remove a git commit which has not been pushed

I did a git commit but I have not pushed it to the repository yet. So when I do git status, I get ‘# Your branch is ahead of ‘master’ by 1 commit. So if I want to roll back my top commit, can I just do: given that when I do git log I get: commit eb27bf26dd18c5a34e0e82b929e0d74cfcaab316 Date: Tue … Read more

git pull on a different branch

I found an incantation that worked for me: then (if you want to merge right away): I was really surprised how hard it was to find an answer to this since it seems like it would be a common use case.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)