Presentation on theme: "An Introduction By Sonali and Rasika. Required for the project Show the versions of your code in the course of development Show versions of your."— Presentation transcript:
Required for the project Show the versions of your code in the course of development Show versions of your documentation.
Tool for keeping a history on state of your source code projects Version control System Allows Collaborative Source Code Management
1. Download Git at - http://git- scm.com/downloadshttp://git- scm.com/downloads 2. Sign-up with bit-bucket at https://bitbucket.org/ and create a 5 member free team. Invite other team members. https://bitbucket.org/ 3. [optional] Install Git-hub GUI client for local machine: 1.windows - https://windows.github.com/https://windows.github.com/ 2.Mac - https://mac.github.com/https://mac.github.com/
1. Download and install the latest version of GitHub for Windows or Mac. This will automatically install Git and keep it up-to- date for you.GitHub for WindowsMac 2. open the Git Shell application and type: 3. git config --global user.name "YOUR NAME" 4. git config --global user.email "YOUR EMAIL ADDRESS"
git init //initializes git git add filename //adds file name git diff //prints difference made in files git commit -m “Message here ” //saved!! git status //prints status of current repository git log //history git push [options] origin branch_name //updates a remote repository with the changes made locally
Git Branching & Merging git branch //Shows all branches of current repository
Commit in Branch git commit -am “Message” git checkout branch_name//Goes to the branch git add.
Merging git merge master branch_name //Used to merge your work with master git checkout -b branch_name //Creates new branch and goes to that branch git branch -d branch name //Deletes the given branch
Fetches all the changes made to the original repo from whom you have forked git fetch upstream Directly pulls the update from the original repo to your current working repo git pull git clone new_repo_url your_name Creates a repo by your_name
git checkout checksum_number git reset --hard checksum_number You will have same status as that commit's data !! Concept: It goes to a no branch state, one can make edits and also commit. But then you need to create that into new branch More information at: http://stackoverflow.com/questions/4114095/revert-to-a-previous-git-commit How to go Back to the last commit?
Git commands - http://git- scm.com/book/commandshttp://git- scm.com/book/commands Git FAQs - https://help.github.com/https://help.github.com/ Git Tutorial videos - http://git- scm.com/videoshttp://git- scm.com/videos Pro Git, a book - http://git-scm.com/bookhttp://git-scm.com/book Learn Git in 15 mins - https://try.github.io/levels/1/challenges/1 https://try.github.io/levels/1/challenges/1 Information on git pull, push and fetch – http://gitref.org/remotes/ http://gitref.org/remotes/