# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1415380746 18000 # Node ID e7b19956f86d294d6a3cf65f3da79536a9e23f65 # Parent 5b2d9e3d58c63b6d38df7684fc938c94d3b5e458 Add tasks diff -r 5b2d9e3d58c6 -r e7b19956f86d task-1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/task-1 Fri Nov 07 12:19:06 2014 -0500 @@ -0,0 +1,51 @@ +For this first task, write a short little program and track it with hg. + +* Write a program that prints out the numbers 1-10. + + Useful commands + =============== + + Get help + -------- + hg help + hg help + + Init a repo + ----------- + hg init + + Add, track files + ---------------- + hg add + hg addremove + + Record changes to your repo + --------------------------- + hg commit + +* Now make some change to your program. Make it print the numbers from + 1 to 100. Record this change. + + Useful commands + =============== + + Get information about your working directory + -------------------------------------------- + hg summary + hg status + hg diff + + Throw out changes in one file back to the repo status + ----------------------------------------------------- + hg revert + + Visit a different revision (these two are synonyms) + ------------------------------------------------------ + hg update + hg checkout + + Inspect a summary of your changes + --------------------------------- + hg log + hg log -G + diff -r 5b2d9e3d58c6 -r e7b19956f86d task-2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/task-2 Fri Nov 07 12:19:06 2014 -0500 @@ -0,0 +1,49 @@ +For this second task, sign up on bitbucket and create a repository. + +* Upload your changes to this repository + + Useful commands + =============== + + Adding more remote paths to your repo + ------------------------------------- + hg config --local + + Compare your repo with the remote + --------------------------------- + hg incoming + hg outgoing + + Send and receive changes from the remote + ---------------------------------------- + hg pull + hg push + +If you pull new changes, you may often also want to update. You can do +both at once with + + hg pull --update + hg pull -u + +* Work with someone else, and both of you push to this repo. One of + you will be unable to push. In order to be able to push, you need to + merge or rebase. Remember that a rebase is a merge in which you + delete one commit. + + Useful commands + =============== + + Merge the files with another revision + ------------------------------------- + hg merge + + Change what a commit is based on + --------------------------------- + hg rebase + + Mark files as being resolved or unresolved in a merge + ----------------------------------------------------- + hg resolve --mark + hg resolve --unmark + +* After you resolve any conflicts, commit your merge and push it.