CS代写

You have probably encountered versioning …
report_Alice_Bob
report_Alice_Carol

Copyright By PowCoder代写 加微信 powcoder

report_Alice report_Alice_new

Free and open-source
Fast, good for teams
Branching, staging
Very widely-used
Lots of help (http://git-scm.com/doc)

(WSL has no X-Windows yet)

On your laptop,
install GitHub Desktop, or command-line Git.
Create a personal GitHub account.

1st commit
main branch
2nd commit …

git init git clone
git status
git add
git add -A
git commit –m “
creates the repo clones a remote repo
status of the repo compares with last commit
add file to staging area
add all to staging area commit changes to repo

set up local and remote repos make some commits, push to remote

Before push:
After push:

checkout: to retrieve a lost/broken file
last commit

git checkout file1
retrieves from last commit

checkout: to look at an earlier snapshot

(detached head)

git checkout
shows the commit history moves head to that commit
temporarily look at that earlier snapshot …
git checkout
back to ‘current’ commit

git branch
git checkout –b
shows branches create a new branch

new_feature

new_feature

new_feature

git branch
git checkout –b
git merge
git branch -d
shows branches create a new branch
merges with branch deletes branch

1) Commit often

2) Commit related changes together

3) Commit completed work

4) Commit with meaningful messages

4.1) Commit with meaningful messages
▪ Use the imperative mood in the subject line
A properly formed Git commit subject line should always be able to complete the following sentence:
If applied, this commit will your subject line here
For example:
If applied, this commit will refactor subsystem X for readability
If applied, this commit will update getting started documentation
If applied, this commit will remove deprecated methods

5) Branch before you build

5.1) Naming Branches
▪ The naming convention simply adds prefixes to branch names, so that branches
of the same type get the same prefix
▪ feature/username/CRnnnn (JIRA issue key)
▪ release/username/CRnnnn (JIRA issue key, if applicable) ▪ bugfix/username/CRnnnn (JIRA issue key)
▪ test/username/CRnnnn (JIRA issue key)
This lets you search for branches in many git commands, like this: git branch –list “feature/*”
git log –graph –oneline –decorate –branches=”feature/*”
git –branches=”feature/*”

6) Take extra backups
• Local Git is not the same as a backup. (What if your computer crashes?)
• Remote Github kind-of is. But other might change the repo.
• Recommend: make occasional backups outside of Git.

7) Agree on a workflow

8) Learn Git as a team
▪ Get together to learn git as a team
▪ Arrange your computers so everyone can see what everyone is doing ▪ Set up the team’s remote repository
▪ Each team members clones it locally
▪ Practice changing files, commit, push, pull, branch, merge etc
▪ This will help you learn Git and agree on your team’s workflow

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com