1.g  it clone git@name:server/BM/APPS.git

be BM_APPS.git The project has been downloaded to the current directory , At this time git@name:server/BM/APPS.git Just your own origin library .

2. Define an alias for your warehouse

For the convenience of later operation , You can define an alias for your warehouse :

#git remote add fork git@name:dev/zhangsan/BM/APPS.git

3.checkout Switch to the current development branch , As a branch of work

git checkout origin/dev_sp4 -b dev_sp4 ( It can also be

Equivalent to two commands :git branch dev_sp4// Create a branch first     Again  git checkout dev_sp4)

4. Take the current branch push To git Server Upper fork In the library

#git push fork dev_sp4

At this time BM_APPS.git The project is the developer zhangsan Own warehouse , It's like starting from git@name:server/BM/APPS.git in fork Coming out .

5. In the local dev_sp4 Develop on branch , Synchronize code before development

git pull origin dev_sp4

Developers develop locally ( newly build / Modify file ) And submit (commit).

git add .

git commit -a -m "<san_zhang@audiencetouch.com><BMS-749><dev><2011/05/03>fix BMS-749"

6. The general development process is as follows :

When developers have new submissions , Need to submit push To your own fork In the library , The operation is as follows :

A. see origin On dev_sp4 Modification record of branch :

#git fetch origin dev_sp4

B. Compare with local dev_sp4 Has the branch changed :

#git diff origin/dev_sp4

C. If there is a change, it is necessary to establish a temporary branch to merge and modify :

#git branch dev_sp4_tmp

#git checkout dev_sp4_tmp

#git rebase origin/dev_sp4  This is the merging of remote content into the current branch ( At present, it is tmp Branch )

D. If there is a conflict, resolve the conflict and submit again :

The general process is :

git rebase origin/dev_sp5 // There is a conflict synchronizing the latest code
git status // View conflict files
vi conflict_files // Fix conflict file
git add // Add the file back to the index
git commit // Re submit code
git rebase --skip // Skip previous conflicting commit
git rebase --continue // continue rebase, Until completion

E. take merge This part of the changes are incorporated locally dev_sp4 Branch :

#git checkout dev_sp4

#git merge dev_sp4_tmp

It can be seen that on the whole , Download the main library first (fetch origin) To local dev Branch (rebase), After developing on this branch , With submission (add,commit after ). Can't submit ( There may be changes in the general database , Someone else submitted ), Then fetch General library , Merge into a new tmp Branch , After dealing with conflict , Update the contents of the general library , Merge into the true Branch (checkout
True branch , then rebase perhaps merge tmp Will do ), Finally delete tmp

F. If there is no conflict, delete the temporary Branch :

#git branch --d dev_sp4_tmp

G. Push code to the server fork library :

#git push fork dev_sp4

Finally, tell the administrator to merge the code by email or other means .

aso project git library :

see cat .git/config after

[core]

        repositoryformatversion = 0

        filemode = true

        bare = false

        logallrefupdates = true

[remote "origin"]

        url = git@repo.allfuck.com:aso

        fetch = +refs/heads/*:refs/remotes/origin/*

[branch "master"]

        remote = origin

        merge = refs/heads/master

[branch "waterforest"]

        remote = origin

        merge = refs/heads/waterforest

url It's an internal agent name . My machine is an intranet machine , You can directly access the server specified by the proxy name with .

I want to change to reality ip Address , It's going to the server , Look up the corresponding conversion name .

my project in git Using process ( Basic operation process ) More articles about

  1. git rebase How to solve conflicts in the process ?

    In execution git rebase We often encounter problems in the process , I'm a little flustered at the moment , How to solve this problem ? 1. First, resolve the local conflict manually 2. Execute the following command git add . git rebase --contine  // continue re ...

  2. SVN Migrate to Git The process of (+ Some skills )

    SVN Migrate to Git The process of (+  Some skills ) Li Shunli Key Words SVN,Git,Clone,Conversion,Tips,VCS,Pro Git About the VCS in SVN and Git Migration between (Clo ...

  3. SVN Migrate to Git The process of (+ Some skills

    About the VCS in SVN and Git Migration between (Clone) There are a lot of articles on this part of the Internet , And they're all very good , Can meet our common needs , Here are some skills I have sorted out and some problems and questions in use . Read this article ...

  4. Xcode in Git Configuration and use of

    Xcode in Git The configuration and use of the system mainly focus on the following issues : problem 1, How to be in Xcode Create a local code base in , And add and submit code to the local code base ? problem 2, How to be in Xcode Submit and push to the remote server code base ? ask ...

  5. git Using process ( One 、 preparation )

    There is no superfluous nonsense , It's just a pure dry record for your own use Git The process of .( Learning , I've just come into contact with , The recording process can be a bit messy . I'll rearrange it after I get familiar with it ) One . To download git client website :http://msysgit.gi ...

  6. Android Development process git、repo、adb、grep And so on

    chown It's a road in the city Unix Commands in the system for setting file owners and file association groups . The superuser's permission is required to execute this command . Only the superuser and the file owner who belongs to the group can change the file association group . Non privileged users ( Non super users ) If you need to set an association group ...

  7. git Common operation process of team development ( Apply to gogs、gitlab、github)

    git Common operation process of team development ( Apply to gogs.gitlab.github) NO1 Project builder (1) Create a warehouse in a remote warehouse (2) Add partner to warehouse partner ( There is no prior requirement ) (2)cd To the project will be storing the project ...

  8. Eclipse in Git How to use and resolve conflicts

    1. How to import existing Git project 1.1 File——>import… The following screen appears 1.2 find Git, Then double click. ‘Project from Git. Or click next 1.3 double-click Clone URI ...

  9. idea in git pull push You need to enter the password over and over again

    In the use of idea In the process of development , At terminal terminal in git pull and git push There was a problem , One is Each submission requires a user name and password ,, I found a solution on the Internet , Make a note of . solve : open git terminal ...

Random recommendation

  1. BZOJ 1078: [SCOI2008] Slant pile

    1078: [SCOI2008] Slant pile Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 770  Solved: 422[Submit][Status][ ...

  2. Visio 2007 How to display field type and concept name when modeling database in

    About the VISIO How to display field types when modeling a database in , And the annotation 1 How to display field types :    stay visio Menu ---> Click database ---> Options ---> file    Open and select table , On top ...

  3. OC The compound in the

    #import <Foundation/Foundation.h> #import "Car.h" int main(int argc, const char * ar ...

  4. 【 Brotherhood 】2016 The new version of Gao Luofeng PHP Training video tutorial

    [ Brotherhood ]2016 The new version of Gao Luofeng PHP Training video tutorial                                                             Video part catalog : Download address :http ...

  5. BZOJ Submit in one day 51 Anniversary ( Two )

    Today, I made another round ... So all the questions are used up ~ There was a mistake CE, Another time, the original procedure was wrong ... But I hope that those who see my efforts will not see my efforts , Even so, one should stick to the end , Like this imperfect submission ...

  6. Microsoft CEO Steve &#183; ballmer (Steve Ballmer) stay 12 I'll retire in six months

    Microsoft CEO Steve Ballmer to retire within 12 months Aug. 23, 2013 Board of directors initiates su ...

  7. ZOJ3629 Treasure Hunt IV( Find the rules , According to the formula )

    Treasure Hunt IV Time Limit: 2 Seconds      Memory Limit: 65536 KB Alice is exploring the wonderland ...

  8. loongnix Community

    http://www.loongnix.org/index.php/%E9%A6%96%E9%A1%B5

  9. CentOS 7 In the environment Pycharm Installation process record

    1. Prepare installation files : Method 1: Use the built-in Firefox browser to access and download the latest format as tar.gz The package website :https://www.jetbrains.com/pycharm/download/previous.h ...

  10. PHP It's a lightweight DI Container class ( turn )

    Understand what is Di/IoC, Dependency injection / Inversion of control . Both are about the same thing , It's a popular design pattern right now . The general meaning is , Prepare a box ( Containers ), Throw in the classes that may be used in the project in advance , Take it directly from the container in the project , That is to avoid direct ...