Changes

Jump to: navigation, search

DPS909 & OSD600 Fall 2019

1,738 bytes added, 14:11, 6 October 2019
no edit summary
** [[OSD & DPS909 Fall 2019 - Release 0.2|Release 0.2]]
** Lab 4 - Complete your first Hacktoberfest PR, and write your first blog post about your fix. See guidelines in the [[OSD & DPS909 Fall 2019 - Release 0.2|Release 0.2]] page. Place both links in a new section under the Submission section.
 
== Week 6 ==
 
* 0.2 Updates
** How's it Going?
** Interesting projects you've found?
 
* <code>git commit --amend</code>
** Add to, correct, or otherwise alter your previous commit and/or comment message
** Use <code>--no-edit</code> to leave the commit message alone
 
* <code>git rebase branch</code>
** Replay commits on a new base branch/commit
** Process goes like this:
*** git finds a common ancestor commit of the branch you're on, and the one you're rebasing onto
*** git calculates DIFFs for each, saves them to disk
*** git checks out the commit you want to branch onto, and begins to replay those diffs one by one
*** if there is a merge conflict, the rebase pauses so you can fix things
*** use <code>git rebase --continue</code> or <code>git rebase --abort</code> to move forward after such a pause
*** use <code>git rebase --skip</code> to ignore the current commit and keep going
** Never rebase commits that are shared publicly in another repo. Only do it on commits you own locally (e.g., a topic branch you are working on)
** Don't use rebase to get rid of commits in a public branch, use <code>git revert commit-sha</code> instead to apply an inverse commit
** If you rebase a branch you've pushed (e.g., for a pull request), when you push, use <code>git push origin branch-name -f</code> (f means force and will overwrite)
** <code>git rebase -i</code> for interactive rebase
*** shows a script of all commits in reverse order (order they will be replayed). You can hand edit this to remove, re-order, or combine commits
** You can squash on the same branch by rebasing on <code>HEAD~n</code> where n is how many commits back from HEAD to go
 
* <code>git cherry-pick SHA</code> to add a commit to the current branch

Navigation menu