Open Akuli opened 3 years ago
@PurpleMyst I'd be interested in what you think about this plan.
I like it, but I'm not sure why git init is bad? I use it
If you use git init
with a github repo, you will also need to know how to git remote add origin https://github.com/username/repo
and then tell git pull
to merge the unrelated histories. It's not terribly complicated, but it's certainly more work than a single git clone
command.
Makes sense. Usually, when I've git init
-ed a repo locally, I make the repo remote on GitHub be empty and make any licenses/gitignores manually
Setup etc:
$ foo
mean in this tutorialBasics:
git clone
, why to avoidgit init
Looking at wtf is going on:
git status
git diff
git diff --staged
(or--cached
in older git versions)git log --oneline --all --graph
, and making an alias for itWorking with other people:
Pull requests:
git checkout -b branchname
,git push --set-upstream origin
Things that the top stackoverflow answer gets wrong:
git reset --hard HEAD^
is generally not as safe asgit revert