Changes between Version 4 and Version 5 of cs222p-2018-fall-git


Ignore:
Timestamp:
Oct 3, 2018, 2:28:03 PM (7 years ago)
Author:
Qiushi Bai
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • cs222p-2018-fall-git

    v4 v5  
    101101shell> git branch            - This command is used to check which branch you are on and what branches are there in your repository. master should be highlighted as you are on master branch.
    102102shell> git checkout -b bob-feature1            - This command creates a new branch and copies all the code from the previous (i.e. master in our case) branch into the new branch.
    103 shell> mkdir project1
    104 shell> cd project1
    105 shell> echo "#include <iostream> using namespace std; int main() { cout << "Hello, World!"; return 0; }" > hello.cpp
     103shell> echo '#include <iostream>' >> hello.cpp
     104shell> echo 'using namespace std;' >> hello.cpp
     105shell> echo 'int main() { cout << "Hello, World!"; return 0; }' >> hello.cpp
    106106shell> git add hello.cpp
    107107shell> git commit -m "added hello world"            - commits changes locally to the bob-feature1 branch