Basic comands GIT witch are needed for work with projects

The initialization of a thread depends on where you want to create your repository.
I'll show you an example at https://bitbucket.org
In order to fill in an existing bits bulletin repository, for example, you need to execute the following commands:
 git remote add origin  your link when creating a project 
 git push -u origin master
Everything, your project is initialized to the repository and is poured on the bitbucket.
There are cases when there is an error that already exists the branch is tied to another repository, then you need to execute the following commands:
git remote remove origin for older version of the git
git remote rm origin - for the new one
git reset HEAD@{0}- back branch
git push -f origin comitname - replace to remote this branch how origin

git branch - name branch what you use now
git checkout master - use master branch

List of basic required commands:
git pull - downloading the latest updates from the repository
git add . - adding modified files for a comit can be added as individual files and all at once using a dot.
git commit "Description of what has changed, what worked"
git push - sending changes when a comit was made
git stash -  there is a need for this command to hide files that you do not want to send to the server.
git cherry-pick <commit_id>
git branch -d <name_branch> del local branch
git push origin --delete <name_branch> del remote branch

In more detail, I advise you to read the documentation at https://git-scm.com/

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. git fetch --all
    git reset --hard origin/master

    ReplyDelete
  3. git merge --abort | very useful command when you have conflict and you don't know what need to do

    ReplyDelete
  4. git remote set-url origin https:///

    ReplyDelete

Post a Comment