DEV Community

Andy Chen
Andy Chen

Posted on

Git ~ Workflow

-Fork and clone code repository (assignment)

git clone (url of clone taken from github repository)
Enter fullscreen mode Exit fullscreen mode

-Make regular commits while conducting work

git add . 
git rm --cached to unstage
git status .
git commit .
git checkout -- <file> discards changes to working directory. reverts the specified file to last commit state.
git log - 
git history -
git remote - specify parent repo where you forked from
Enter fullscreen mode Exit fullscreen mode

-Push your code (after each commit)

git commit .
Enter fullscreen mode Exit fullscreen mode

-Create your final commit with the message "Assignment Complete"

git push origin master
Enter fullscreen mode Exit fullscreen mode

-Submit your final code via a Pull request in GitHub
done on Github

pwd - print working directory (displays the path)
mkdir - make directory within
touch - access or "touch" a file - if DNE, file will be created
if does exist, timestamp of last access to the file will be updated
Enter fullscreen mode Exit fullscreen mode

Top comments (0)