Last week we didn't take presentation class.But I had prepared to present my topic.Now we are talking about git and the book 'Learn Python Hard Way' .In Last class Sir gave us some tasks by using python program.It was an interesting topic and I did some exercises from the book 'Learn Python Hard Way' and I pushed all this exercises to git hub repository.At this time I could understand more about git hub.Now we are discussing more about git as we discussed some basic comments of git in the earlier blog.
- git config
This command sets the author name and email address respectively to be used with your commits.
git config --global user.email firstname.lastname@example.org
- git clone
This command is used to copy a repository. If the repository lies on a remote server, use.
git clone username@host:/path/to/repository
- git diff
This command is used to lists down conflicts. In order to view conflicts against the base file, use
git diff --base <file-name>
The following basic Git command is used to view the conflicts between branches before merging them.
git diff <source-branch> <target-branch>
To list down all the present conflicts, use.
- git log
This command is used to used to see the repository’s history by listing certain commit’s details.
- git merge
This command merges the specified branch’s history into the current branch.
git merge <branch-name>
- git remote
This command is used to connect your local repository to the remote server.
git remote add origin <host-or-remoteURL>
- git push
This command sends the committed changes of master branch to your remote repository.
git push origin <master>
Replace <master> with the branch where you want to push your changes.
My presentation topic is git-archive.
git-archive - Create an archive of files from a named tree
git archive [--format=<fmt>] [--list] [--prefix=<prefix>/] [<extra>] [-o <file> | --output=<file>] [--worktree-attributes] [--remote=<repo> [ --exec=<git-upload-archive>]] <tree-ish> [<path>...]
Stay tuned for next week, Thank You.