Get straight to the topic:
--> Github is a platform where we can create your rapo and work in a group efficiently.
1) create an account at the GitHub
2) create a rapo (needs simple form filling skills or refer youtube)
3) (for Ubuntu) sudo apt-get install git(a tool for interacting, posting, getting data, at
GitHub)
4) mkdir <directory name>
5) cd <directory name>
6) git init
7) git config -- user.name " "
9) git config -- user.email" "
10) create a file and save it
11) add the file
12) commit the file
13) push the file to the server
14) merge the branch/ pull data change/ continue work
commands of GIT:
Push changes to remote repository (remembered branch)
git push
Delete a remote branch
git push origin --delete [branch name]
Update local repository to the newest commit
git pull
Pull changes from remote repository
git pull origin [branch name]
Add a remote repository
git remote add origin ssh://git@github.com/[username]/[repository-name].git
Set a repository's origin branch to SSH
git remote set-url origin ssh://git@github.com/[username]/[repository-name].git
Inspection &
Comparison
Preview changes before merging
git diff [source branch] [target branch}
Getting & Creating Projects
Initialize a local Git repository
Create a local copy of a remote repository
git clone ssh://git@github.com/[username]/[repository-name].git
Basic Snapshotting
Add a file to the staging area
Add all new and changed files to the staging area
git commit -m "[commit message]"
Remove a file (or folder)
git rm -r [file-name.txt]
Branching & Merging
List branches (the asterisk denotes the current branch)
List all branches (local and remote)
git branch -d [branch name]
git push origin --delete [branchName]
Create a new branch and switch to it
git checkout -b [branch name]
Clone a remote branch and switch to it
git checkout -b [branch name] origin/[branch name]
git checkout [branch name]
Switch to the branch last checked out
Discard changes to a file
git checkout -- [file-name.txt]
Merge a branch into the active branch
Merge a branch into a target branch
git merge [source branch] [target branch]
Stash changes in a dirty working directory
Remove all stashed entries
Sharing & Updating Projects
Push a branch to your remote repository
git push origin [branch name]
Push changes to remote repository (and remember the branch)
git push -u origin [branch name]
THANKS FOR READING
ReplyDeleteThis was truly awesome. Thanks so much for this..!
Azure DevOps online training
Microsoft Azure DevOps Training
Microsoft Azure DevOps Online Training
Are you Advertising here
DeleteInformative blog. Thank you for sharing with us..
ReplyDeleteDevOps Online Training
These articles are exactly what I need. It is very nice of you to share your understanding. I have learned interesting things. I have a liking for your posts on GITHUB
ReplyDeleteDevOps Training in Chennai
DevOps Online Training in Chennai
DevOps Training in Bangalore
DevOps Training in Hyderabad
DevOps Training in Coimbatore
DevOps Training
DevOps Online Training
Nice and good article.Thanks for sharing this wonderful content.its very useful to us.I gained many unknown information, the way you have clearly explained is really fantastic.This is incredible,I feel really happy to have seen your webpage.
ReplyDeleteFull Stack Training in Chennai | Certification | Online Training Course
Full Stack Training in Bangalore | Certification | Online Training Course
Full Stack Training in Hyderabad | Certification | Online Training Course
Full Stack Developer Training in Chennai | Mean Stack Developer Training in Chennai
Full Stack Training
Full Stack Online Training