You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.org
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -266,6 +266,8 @@ git status
266
266
git log
267
267
git log --oneline
268
268
git log --oneline --graph
269
+
git log --author=~Darren
270
+
git log --since=5.days # or weeks, months, years
269
271
#+END_SRC
270
272
- You can identify commit by unique ID or by HEAD offset
271
273
- HEAD is a pointer to the most recent commit
@@ -521,6 +523,15 @@ git pull origin master
521
523
#+END_SRC
522
524
523
525
*** Edit conflict, stage, commit, and push
526
+
Edit the file to resolve the conflict. You can delete one of the two lines, combine them, or make any other changes. Delete the conflict markers before staging the file (the lines beginning in "<", "=", and ">").
- .ipynb files contain a lot of JSON boilerplate that isn't code
533
544
545
+
** Next steps (intermediate Git)
546
+
*** Useful commands that you should add to you repertoire
547
+
- git blame: See who changed each line of a file
548
+
- git bisect: Find out when a change was introduced (good man page)
549
+
- git revert: Undo your recent commits (good man page)
550
+
- git add --patch: Stage a part of a file ("hunk") instead the entire file
551
+
- git -i <command>: Run a command interactively, confirming each step
552
+
*** Potentially dangerous commands that are useful in certain circumstances. Use with caution!
553
+
- git reset: Throw away uncommitted changes (there are many options that affect what gets thrown away; read the documentation)
554
+
- git reset --hard: Throw away some of your commits to get back to an earlier project state. Cannot be undone!
555
+
- git rebase: Rewrite the history of branch A to include branch B. This is different than merging branch B into branch A; merging retains your project history, whereas rebasing rewrites that history.
556
+
- git squash: Convert multiple commits into a single commit. This also rewrites your project history.
557
+
*** Dangerous commands you should avoid
558
+
- git cherry-pick: Copy a single commit from a different branch. This rewrites your project history piecemeal, which can make it difficult to merge branches in the future.
559
+
534
560
* Additional reading
535
561
- The Pro Git book: https://git-scm.com/book/en/v2
536
562
- "Git is built on a graph. Almost every Git command manipulates this graph. To understand Git deeply, focus on the properties of this graph, not workflows or commands.": https://codewords.recurse.com/issues/two/git-from-the-inside-out
0 commit comments