Skip to content

lengss/gitCooperationExercise

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

gitCooperationExercise

Finish this tutorial with bash commands is recommended, while you can use GUI as well.

Just enjoy it.:)

Mission 1

Step 1

Install Git.

Step 2

Right click a prepared directory and choose Git Bash Here or Git GUI Here.I am going to discuss the bash way in Windows only.

Step 3

  • git clone <url>

Init your new repo with a remote repo.And you are now in the branch master.

Our remote repo : [email protected]:thytless/gitCooperationExercise.git

Step 4

Some necessary configurations.

  • git config --global user.name "<Your Name>"
  • git config --global user.email <Your Email Address>
  • git config --global core.autocrlf true : if on Windows, just do it.

Caution: --global option will change the global git configuration on your computer, e.g on Windows, in "C:\Users\???\.gitconfig".

  • git remote add origin <url> : add a new remote repo named origin

Mission 2

Try git commands with some text work. Now we have reqdoc4.0.md in our repo, use your favorite editor to add more discriptions.

  • git status or git st : File info and command advice.
  • git add <filename> : add this (unstaged) file to index.Necessary before commit.
  • git commit -m "<message>" : commit your change with a concluding message.
  • git commit -a -m "<message>" : add all unstaged file into index, then commit.
  • git checkout -- <filename> : abandon all changes made to this file since last commit.

Learn more

About

Just try it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors