├── 0_upload.bat ├── pixel_git_github ├── MSC.jpg ├── git.jpg ├── repo.jpg ├── github.jpg ├── undoing.jpg ├── use_git.jpg ├── branches.jpg ├── github_0.jpg └── commit_safepoints.jpg ├── conflicts ├── merge_conflict │ ├── merge_error.jpg │ ├── conflicts_occurs.jpg │ └── merge_conflict_solved.txt ├── push_conflict │ ├── push_conflict.jpg │ ├── push_conflict_solved_2.txt │ └── push_conflict_solved_1.txt └── fork_conflicts │ └── fork_conflict_solved.txt ├── 1_config_git.txt ├── 5_merging&conflicts.txt ├── 4_branching.txt ├── 3_undoing.txt ├── 2_commit_stage.txt ├── 6_push_pull_clone.txt ├── git_github_cmd.txt └── README.md /0_upload.bat: -------------------------------------------------------------------------------- 1 | git status 2 | 3 | git add . 4 | 5 | git commit -m %1 6 | 7 | git push origin master 8 | 9 | -------------------------------------------------------------------------------- /pixel_git_github/MSC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/pixel_git_github/MSC.jpg -------------------------------------------------------------------------------- /pixel_git_github/git.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/pixel_git_github/git.jpg -------------------------------------------------------------------------------- /pixel_git_github/repo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/pixel_git_github/repo.jpg -------------------------------------------------------------------------------- /pixel_git_github/github.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/pixel_git_github/github.jpg -------------------------------------------------------------------------------- /pixel_git_github/undoing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/pixel_git_github/undoing.jpg -------------------------------------------------------------------------------- /pixel_git_github/use_git.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/pixel_git_github/use_git.jpg -------------------------------------------------------------------------------- /pixel_git_github/branches.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/pixel_git_github/branches.jpg -------------------------------------------------------------------------------- /pixel_git_github/github_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/pixel_git_github/github_0.jpg -------------------------------------------------------------------------------- /pixel_git_github/commit_safepoints.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/pixel_git_github/commit_safepoints.jpg -------------------------------------------------------------------------------- /conflicts/merge_conflict/merge_error.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/conflicts/merge_conflict/merge_error.jpg -------------------------------------------------------------------------------- /conflicts/push_conflict/push_conflict.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/conflicts/push_conflict/push_conflict.jpg -------------------------------------------------------------------------------- /conflicts/merge_conflict/conflicts_occurs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bharathguntreddi3/GitHive/HEAD/conflicts/merge_conflict/conflicts_occurs.jpg -------------------------------------------------------------------------------- /1_config_git.txt: -------------------------------------------------------------------------------- 1 | -- git config --global user.name [--username] 2 | -- git config user.name #checkuser 3 | 4 | -- git config --global user.email [--useremail] 5 | -- git config user.email #checkmail 6 | -------------------------------------------------------------------------------- /conflicts/push_conflict/push_conflict_solved_2.txt: -------------------------------------------------------------------------------- 1 | -- git push --force #forcing the git to push the files 2 | 3 | -- git push --force-with-lease #it prevents accidentally deleting other's commits on the remote -------------------------------------------------------------------------------- /5_merging&conflicts.txt: -------------------------------------------------------------------------------- 1 | #checkout to the master branch before merging the branches!!! 2 | 3 | -- git merge [--branch_name] #merge the new_branch to master branch 4 | 5 | -- git commit #conflict occurs when we merge the same file with different text -------------------------------------------------------------------------------- /4_branching.txt: -------------------------------------------------------------------------------- 1 | -- git branch [--new_branch_name] #add new branch 2 | 3 | -- git branch -a #check the branches 4 | 5 | -- git checkout [--new_branch_name] #change to the new branch 6 | 7 | -- git branch -D [--new_branch_name] #delete a branch '-D' used before merging 8 | 9 | -- git checkout -b [--new_branch_name] -a #create and change to the new branch -------------------------------------------------------------------------------- /conflicts/push_conflict/push_conflict_solved_1.txt: -------------------------------------------------------------------------------- 1 | /*---A team is working on a project and the team members had changed some files and If there are different changes on both the remote and the local branch, instead of just pulling the master by 'git pull'--*/ 2 | 3 | #just give the following command 4 | 5 | -- git pull -rebase master origin #to confirm a pull request when it fails to push repo 6 | 7 | -------------------------------------------------------------------------------- /3_undoing.txt: -------------------------------------------------------------------------------- 1 | -- git checkout [--unique_id_of_commit] 2 | 3 | -- git checkout [--branch_name] #go to the last recent commit 4 | 5 | -- git revert [--unique_id_of_commit] #revert the commit and and again commits the reverted_can change the msg 6 | 7 | -- git reset [--unique_id_of_commit] #reset a commit and rollback 8 | 9 | -- git reset [--unique_id_of_commit] --hard #hard flag to ratain no changes -------------------------------------------------------------------------------- /conflicts/merge_conflict/merge_conflict_solved.txt: -------------------------------------------------------------------------------- 1 | #merge conflict occurs when there is a difference between the states of the files while merging 2 | 3 | #edit the files and combine the different states of the files and then merge.After editing the file, then commit the changes and then merge the branches 4 | 5 | -- git commit -m "[--any_message]" 6 | 7 | -- git merge [--branch_name] #merge the edited file to the master branch -------------------------------------------------------------------------------- /2_commit_stage.txt: -------------------------------------------------------------------------------- 1 | -- git init #initiate the git 2 | 3 | -- git status #files changed but not staged 4 | 5 | -- git add [--file_name]or [space .] #add files to stagen area; '.' to select all files' 6 | 7 | -- git rm --cached [--file_name] #to unstage the files 8 | 9 | -- git commit -m "[--any_msg_needed]" 10 | 11 | -- git log #shows history of the commits 12 | 13 | -- git log --oneline #shows history of commits in oneline 14 | 15 | -- git diff #differences between states of the files -------------------------------------------------------------------------------- /6_push_pull_clone.txt: -------------------------------------------------------------------------------- 1 | /*--push to github*/ 2 | 3 | -- git push [--url_of_repo] [--branch] #push to repo to the branch 4 | 5 | -- git remote add [--alias_name #generally_alias_is_origin] [url_of_repo] #add an alias name to the repo instead of link 6 | 7 | -- git push origin master #pushing with the alias name 8 | 9 | -- git clone [--repo_url] #cloning a repo locally 10 | 11 | -- git remote -v #already stored to origin in the cloned repo 12 | 13 | -- git pull origin master #pulls the all new chages and updates to our local repo -------------------------------------------------------------------------------- /conflicts/fork_conflicts/fork_conflict_solved.txt: -------------------------------------------------------------------------------- 1 | /*suppose you have forked your repo say 'boom' from another repo say 'chow' but you dont have permission to write into 'chow'*/ 2 | 3 | /*when you try to pull request on 'chow' to get the latest changes and try to merge them into your repo ''boom' !it will slide a megre conflict*/ 4 | 5 | #Resolve the conflict by 6 | 7 | --git remote add upstream https://chow #add upstream remote 8 | 9 | --git checkout master 10 | 11 | --git merge upstream/master #merge in upstream changes 12 | 13 | --git push origin master #And then push 14 | 15 | #!!!BOOM your pull request automatically updates -------------------------------------------------------------------------------- /git_github_cmd.txt: -------------------------------------------------------------------------------- 1 | git config --global user.name [--username] 2 | git config user.name #checkuser 3 | git config --global user.email [--useremail] 4 | git config user.email #checkmail 5 | 6 | 7 | git init #initiate the git 8 | git status #files changed but not staged 9 | git add [--file_name]or [space .] #add files to stagen area; '.' to select all files' 10 | git rm --cached [--file_name] #to unstage the files 11 | git commit -m "[--any_msg_needed]" 12 | git log #shows history of the commits 13 | git log --oneline #shows history of commits in oneline 14 | git diff #differences between states of the files 15 | 16 | git checkout [--unique_id_of_commit] 17 | git checkout [--branch_name] #go to the last recent commit 18 | git revert [--unique_id_of_commit] #revert the commit and and again commits the reverted_can change the msg 19 | git reset [--unique_id_of_commit] #reset a commit and rollback 20 | git reset [--unique_id_of_commit] --hard #hard flag to ratain no changes 21 | 22 | git branch [--new_branch_name] #add new branch 23 | git branch -a #check the branches 24 | git checkout [--new_branch_name] #change to the new branch 25 | git branch -D [--new_branch_name] #delete a branch '-D' used before merging 26 | git checkout -b [--new_branch_name] -a #create and change to the new branch 27 | 28 | #checkout to the master branch before merging the branches!!! 29 | git merge [--branch_name] #merge the new_branch to master branch 30 | git commit #conflict occurs when we merge the same file with different text 31 | 32 | 33 | /*--push to github*/ 34 | git push [--url_of_repo] [--branch] #push to repo to the branch 35 | git remote add [--alias_name #generally_alias_is_origin] [url_of_repo] #add an alias name to the repo instead of link 36 | git push origin master #pushing with the alias name 37 | git clone [--repo_url] #cloning a repo locally 38 | git remote -v #already stored to origin in the cloned repo 39 | git pull origin master #pulls the all new chages and updates to our local repo 40 | 41 | /*-push conflict-*/ 42 | git push origin master --force 43 | git push origin master -rebase 44 | 45 | /*-merge conflict-*/ 46 | #merge conflict occurs when there is a difference between the states of the files while merging 47 | #edit the files and combine the different states of the files and then merge.After editing the file, then commit the changes and then merge the branches 48 | git commit -m "[--any_message]" 49 | git merge [--branch_name] #merge the edited file to the master branch 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Git_GitHub_Test 2 | Find everything about git and github you are looking for and the commands for git and github. Fully tested gateway to git & github 3 | 4 | 5 | 6 | /*--------------------------------------------------------------------------------------------------------*/ 7 | 8 | 9 | git config --global user.name [--username] 10 | 11 | git config user.name #checkuser 12 | 13 | git config --global user.email [--useremail] 14 | 15 | git config user.email #checkmail 16 | 17 | 18 | 19 | /*-----------------------------------------------------------------------------------------------------*/ 20 | 21 | 22 | git init #initiate the git 23 | 24 | git status #files changed but not staged 25 | 26 | git add [--file_name]or [space .] #add files to stagen area; '.' to select all files' 27 | 28 | git rm --cached [--file_name] #to unstage the files 29 | 30 | git commit -m "[--any_msg_needed]" 31 | 32 | git log #shows history of the commits 33 | 34 | git log --oneline #shows history of commits in oneline 35 | 36 | 37 | 38 | 39 | git diff #differences between states of the files 40 | 41 | 42 | 43 | /*--------------------------------------------------------------------------------------------------------*/ 44 | 45 | 46 | git checkout [--unique_id_of_commit] 47 | 48 | git checkout [--branch_name] #go to the last recent commit 49 | 50 | git revert [--unique_id_of_commit] #revert the commit and and again commits the reverted_can change the msg 51 | 52 | git reset [--unique_id_of_commit] #reset a commit and rollback 53 | 54 | git reset [--unique_id_of_commit] --hard #hard flag to ratain no changes 55 | 56 | git branch [--new_branch_name] #add new branch 57 | 58 | git branch -a #check the branches 59 | 60 | git checkout [--new_branch_name] #change to the new branch 61 | 62 | git branch -D [--new_branch_name] #delete a branch '-D' used before merging 63 | 64 | git checkout -b [--new_branch_name] -a #create and change to the new branch 65 | 66 | #checkout to the master branch before merging the branches!!! 67 | 68 | git merge [--branch_name] #merge the new_branch to master branch 69 | 70 | git commit #conflict occurs when we merge the same file with different text 71 | 72 | 73 | 74 | 75 | 76 | /*--------------------------------------------------------------------------------------------------------*/ 77 | 78 | 79 | /*--push to github*/ 80 | 81 | git push [--url_of_repo] [--branch] #push to repo to the branch 82 | 83 | git remote add [--alias_name #generally_alias_is_origin] [url_of_repo] #add an alias name to the repo instead of link 84 | 85 | git push origin master #pushing with the alias name 86 | 87 | git clone [--repo_url] #cloning a repo locally 88 | 89 | git remote -v #already stored to origin in the cloned repo 90 | 91 | git pull origin master #pulls the all new chages and updates to our local repo 92 | 93 | 94 | 95 | 96 | 97 | /*--------------------------------------------------------------------------------------------------------*/ 98 | 99 | 100 | /*-push conflict-*/ 101 | 102 | git push origin master --force 103 | 104 | git push origin master -rebase 105 | 106 | 107 | 108 | 109 | 110 | /*--------------------------------------------------------------------------------------------------------*/ 111 | 112 | 113 | /*-merge conflict-*/ 114 | 115 | #merge conflict occurs when there is a difference between the states of the files while merging 116 | 117 | #edit the files and combine the different states of the files and then merge.After editing the file, then commit the changes and then merge the branches 118 | 119 | git commit -m "[--any_message]" 120 | 121 | git merge [--branch_name] #merge the edited file to the master branch 122 | 123 | 124 | ! If you like the content published and feel satisfactory, then don't forget to follow me for more insteresting stuff and make a star of this repo !! 125 | 126 | --------------------------------------------------------------------------------