Hack hack hack...

An open journal-- some of it written for you, but most of it is for me.

FISDay0

Why are we here?

-To fall in love with code

-If you give 100% you will change.

Programmer(s) of the day

CSS Selectors

1
2
3
4
5
6
#elements, #links{
 padding: 25px 0 15px 0;
}
#elements h2{
  font-size: 2em;
}

Git

1
2
# git remote add <remote name> <link>
♕ git remote add group git@github.com:ajonas04/etcetc.com.git
1
2
3
4
5
git fetch 
git co #not ever changing the state of any branch
git pull
git branch -a #shows all local branches
git branch #shows all the remotes

can get pull requests from forks as well as the head repo

always want to deal with potential conflicts in the feature branch rather than on master

rebase take these commits from master and put them in the right place of x feature branch

1
2
3
4
git rebase master
git co master
git merge add-profile-rexfeng --no-ff #=> merge made by recursive strategy
git push

If it’s forked:

1
git rebase upstream/master

Git rainbow is not good.

squashing commits

go into my fork as a remote

1
2
3
4
5
git remote add ajonas04 git@github.com:ajonas04/students.flatironschool.com.git
git fetch ajonas04
git co feature-push
git rebase origin/master #resolve 
git rebase --continue
1
2
git reset --hard HEAD #=> reset to the state of the repo at the last commit in the repo
git branch -D add_profile_page

interactive rebase

1
2
git rebase master -i
#provide a file that shows all the commits in it

no fastforward versus fastforward -maintains the fact that you were once on your own branch

recursion and fast forward checkout the branch

1
2
3
git add . #will ADD all files that haven't been previously committed as well as change modified files
git commit -am 'message' #will change files, but not add new ones
git commit -m 'message' #will just add a message

Workflow to pull down the most updated verison:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
♕ git fetch upstream
♕ git rebase upstream/master
First, rewinding head to replay your work on top of it...
error: The following untracked working tree files would be overwritten by checkout:
  .DS_Store
  images/.DS_Store
Please move or remove them before you can switch branches.
Aborting
could not detach HEAD
[19:02:04] (master) students.flatironschool.com
♕ rm .DS_Store
♕ rm images/.DS_Store
♕ git rebase upstream/master
♕ git add aviflombaum.html
♕ git rebase --continue
♕ subl .

Comments