Arcticle has it all

https://gun.io/blog/how-to-github-fork-branch-and-pull-request/

Get Branching

About: Git branching allows user to experiment with different version of a project by checking out separate branches to work on.

$ git branch -- show which branche that you are on [list of all branches].

$ git branch <new_branch> -- create a new branch called new_branch.

-- delete a branch by using 'branch -d <name>'

$ git checkout branch_name -- switch to a branch.

Git Basic commands

$ git add <filename> -- adds this file to the staging area.

-- after any changes, need to stage the file again.

$ git commit -m "Commit message" -- creates the actual commit.

$ git log -- show a list of all the commits.

Merging Branches

$ git merge <branch_name>

Notes From Wumpus

Setting up:

git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL ADDR"

To push from cmdline after creating proj on github web.

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/rabbitear/javascript-class.git
git push -u origin master

Issues That Came Up

To get the new branch galaga-config to push, I had to do a couple of extra things. Here's the jist of it.

First I forgot the git config --global user.name "name" and the git config --global user.email me@you.com, so it asked me to git commit --amend --reset-author. Then I ran these other two commands to put in the new branch:

git config --local push.default matching
git push --set-upstream origin galaga-config

To be continued.

Issue, The missing file

This is a WARNING, if you git checkout to a new_brnach, then change the files around, they change back to the master branch, and do not merge back that file is gone.. Until you switch back to the new_branch.

[SOLVED]
  1. what I need to do is be in galaga-config branch: git checkout galaga-config
  2. copy the .vimrc back into the repo: cp ~/.vimrc ~/vimwiki/vimrc-galaga
  3. checkout the master branch: git checkout master
  4. then merge the the galaga-config branch back in: git merge galaga-config
  5. then check the status, and add and commit as necessary. git status

Remove BIGest files from git repositary

eof

Git Notes

I made the push.default set to current: