-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
You may use GUI client to achieve this, but I will not provide any tutorial as it varies by apps.
- Open your Terminal or Git Bash or Ubuntu Bash and
cd
to the folder where you want to save this project. No need to create a folder for this project as Git will take care of that. - Copy, paste and run
git clone https://github.com/jing928/SupermarketSupportSystem.git
It may ask for your GitHub credentials, type in your login email address and password to continue. For Mac users, the Keychain should store the credentials the first time you enter it so that you don't need to do it again. However for Windows users, this may or may not be the case, as the last time I used Windows for this was a long time ago. If you have issues, let me know.
Now that you have the project copied to your local machine and also linked with GitHub as the origin master
.
- Run
git status
to view the status of the project, e.g. if there is any untracked or unstaged files. - Run
git pull
when you want to pull in the latest code changes made by other team members. - Run
git push
when you want to push your latest code changes to the GitHub. - Run
git checkout -b [branch_name]
to create a new branch off of the current branch (normally master) and switch to it. (replace[branch_name]
with the name you make) - Run
git add [file path]
to add a file tostaging area
, where it can be committed. - Run
git commit -m "[commit message]"
to commit all files that are in thestaging area
. Replace `[commit message] with your personal message that describes what this commit is about and usually starts with a verb in present sense, e.g. Create a new test case for XXX method. - Run
git log
to view change logs.
There are many many more commands that you may need to use over the course of this project or even your career as a programmer. For a comprehensive learning experience, please use the Pro Git as a great reference and/or textbook.