quinta-feira, 31 de outubro de 2013

References of Git

$ git config --global user.name "Your Name Comes Here"
$ git config --global user.email you@yourdomain.example.com
$ git init
OR
$ git clone https://github.com//APPLICATION_NAME.git  //When the project already exists

$ git add .
OR
$ git add file1 file2 file3
$ git commit -m "Initial commit"
$ git remote add origin https://github.com//APPLICATION_NAME.git
                origin is a name of a remote repository(or branch) to be pushed in master
$ git remote -v  //To see if this remove repository was created
git status
$ git pull origin master  //Before push you should give a pull to ensure the your master is equals to origin

$ git push -u origin master
               
                .gitignore contains all file and directories that should be ignored

With a Branch
$ git checkout -b BRANCH_NAME   //switch to a new branch
$ git add src/test/com/roma/MethodTest.groovy
OR
$ git commit -m "Added tests for new one functionality"
- git push origin BRANCH_NAME
- go to github.commit
                - see if the branched was pulled
                               - click in Pull Request                    
                              


- GitHub Commands
                git init
                Create a .gitignore file in include all files and directories that you don't want to commit
                git add . //add all files to local git
                git status -a / show all files that are modified or added
                git remote add origin git@github.com:USER/REPO.git
                git push -u origin master
               

                               

Nenhum comentário:

Postar um comentário