GitHub Eclipse Project

Source: Internet
Author: User

Co-participants
Collaborators are primarily used to read and write access to the code repositories owned by individual accounts. You can add collaborators (other github personal accounts) by https://github.com/[user name//code warehouse name]/settings/collaboration.

CD * * * * go to the directory where you want to place the project

Get the remote code
git clone [email protected]:xiwi94/learngit.git

CD Learngit

git checkout-b dev Local create branch Dev and switch to that branch (working on this branch)

"Git branch see which branch you're currently in"

git checkout Master

git merge Dev

git branch-d dev [remove Dev Branch]

The push branch is the push of all local commits on that branch to the remote library. When pushing, specify the local branch so that git pushes the branch to the remote branch of the remote library:
Git push Origin Master
Or
Git push Origin Dev
The Dev Branch is a development branch, and all members of the team need to work on it, so they need to be synchronized with the remote.

Git add ***[modified file/Name of the created file] Add file to staging area
git commit-m[comment] "This is a comment" put the files in the staging area to the local repository
Git push origin Dev synchronizes modifications of the local repository to the remote repository

Push failed because the latest submission from your partner is in conflict with the submission you are trying to push, the workaround is simple, Git has prompted us to grab the latest commit from Origin/dev with git pull, then merge locally, resolve the conflict, and then push:
Git pull to get updated data
Git pull Origin Dev

This time git pull succeeds, but the merge conflicts, it needs to be solved manually, the solution is exactly the same as the conflict resolution in branch management. After resolving, submit, then push

Resolve Conflicts

git status
Look at the management records what happened ...
Git status can also tell us about conflicting files:

$ git status
# on Branch Master
# Your Branch is ahead of ' Origin/master ' by 2 commits.
#
# unmerged paths:
# (use "Git add/rm <file> ..." as appropriate to mark resolution)
#
# both Modified:readme.txt
#
No changes added to commit (use "git add" and/or "Git Commit-a")

To modify a conflict using a text editor
VI Readme.txt

git add readme.txt
Git commit-m "Conflict fixed" <== This is the comment that the submission will display >

git ignores files: http://my.oschina.net/taisha/blog/75746

Eclipse . Gitignore Configuration

# Generated files
bin/
gen/
# Local configuration file (SDK path, etc)
Local.properties
# Eclipse Project Files
. classpath
. Project
. settings/

============================================
Git init

Vi. Git/info/exclude Modifying the Ignor file for the local warehouse

Git add-u

Git commit-m ""

git remote add origin [email protected]:xiwi94/redrockmanager.git

Git push-u Origin Master

GitHub Eclipse Project

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.