git Tutorial
Introduction Installing Git Understanding Git architecture Initializing the new Git respository Cloning new Git repository .git directory in Git repository Viewing Git configuration First time Git configuration Using SSH keys with Git Checking Git status Adding files into staging area in Git Committing changes to the local repository Ignoring files using .gitignore Viewing the history of commits Viewing the file contents in working directory, staging area and repository Viewing difference between files Viewing the history of files Git revert Git Reset git reflog Creating and switching to new branches in Git Viewing existing branches Merging branches Resolving conflicts Rebase Deleting branches Renaming the branch in Git Push Pull Stashing the changes in Git Tags in Git Patches in Git Creating new repository on GitHub Pushing local repository to remote repository like GitHub IntelliJ IDEAPushing local repo to remote in git
We have already seen how to initialize a local repository using Git. Now suppose you want to push this repository to remote repository on GitHub. Below image shows how to add remote repository and push local repository to remote one. In 2 steps, you can push the changes.- First register remote repository using git remote add origin repository_url
- Then push the local repository changes to remote using git push -u origin master command. The meaning of this command is that push the local repository’s current branch to the master branch of remote repository. -u switch sets the upstream branch permanently. So next time, you can just use git push command
git remote rename origin myorigin
Web development and Automation testing
solutions delivered!!