Skip to main content

Local GitHub setup and push

After setting up a GitHub account, configure your local repository, using gitbash
Create a folder for your local repository
   mkdir /c/localrepo
   cd /c/localrepo
Git localrepo config
   git config –global user.name “username”
   git config –global user.email “youremail@yourdomain”
   git init
   git remote add origin https://github.com/username/repository.git
Copy/Create your file in your local repository and configure it for git
   git add File.txt
   git commit -m “Add a comment for your addition/update”
Push your file from your localrepo to your GitHub repository
   git push
warning: push.default is unset; its implicit value has changed in
Git 2.0 from ‘matching’ to ‘simple’. To squelch this message
and maintain the traditional behavior, use:
  git config –global push.default matching
To squelch this message and adopt the new behavior now, use:
  git config –global push.default simple
When push.default is set to ‘matching’, git will push local branches
to the remote branches that already exist with the same name.
Since Git 2.0, Git defaults to the more conservative ‘simple’
behavior, which only pushes the current branch to the corresponding
remote branch that ‘git pull’ uses to update the current branch.
See ‘git help config’ and search for ‘push.default’ for further information.
(the ‘simple’ mode was introduced in Git 1.7.11. Use the similar mode
‘current’ instead of ‘simple’ if you sometimes use older versions of Git)
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
    git push –set-upstream origin master
   git config –global push.default simple
   git push –set-upstream origin master

Comments

Popular posts from this blog

Generate SQL Loader Control Files

There is an easy way to generate SQL Loader control files using SQL Developer Import functionality as described by the post below http://www.thatjeffsmith.com/archive/2012/08/using-oracle-sql-developer-to-setup-sqlloader-runs/ Using Oracle SQL Developer to Setup SQL*Loader Runs by  thatjeffsmith   on August 15, 2012   55 comments Tell Others About This Story: 0 1 0 I've done a couple of posts on how to use SQL Developer to load your Excel files to an Oracle table. However, I always wonder how many folks realize there may be a 'better way.' If you are loading data to Oracle on a regular basis, there's a few things I want you to know about: SQL*Loader Data Pump External Tables SQL*Loader is a client tool. It runs on your desktop and connects to the database over SQL*Net. It's part of the Oracle Client installation. It reads one or more files, parses the data, and loads it to your tables. A control (CTL) file that defines how the data i...

NodeJS MSSQL connection error "EINVALIDSTATE"

It took me some time to find the reasons for the connection error below: Requests can only be made in the LoggedIn state, n…", code: "EINVALIDSTATE" I was trying to connect to MS Sql server using Node JS TEDIOUS package. The code from the Microsoft  is very simple and didn't return a more complete error message. This is the original code: ... var connection = new Connection(config);  connection.on( 'connect' , function ( err ) {  // If no error, then good to proceed.  console .log( "Connected" );  executeStatement(); }); ... Checking the internet a bit more, I found a way to get more insight into the error: ... var  connection =  new  Connection(config);  connection.on( 'connect' ,  function ( err )  {  if (err) return console.error(err);   console .log( "Connected" );  executeStatement(); }); ... That raised: ConnectionError {message: "Failed to connect to 10.0.0.100:1433 - c...

AWS Athena and S3 Partitioning

Athena is a great tool to query your data stored in S3 buckets. To have the best performance and properly organize the files I wanted to use partitioning. Although very common practice, I haven't found a nice and simple tutorial that would explain in detail how to properly store and configure the files in S3 so that I could take full advantage of the Athena partitioning features. After some testing, I managed to figure out how to set it up. This is what I did: Starting from a CSV file with a datetime column, I wanted to create an Athena table, partitioned by date. A basic google search led me to this  page , but It was lacking some more detailing. The biggest catch was to understand how the partitioning works. Based on a datetime column(processeddate), I had to split the date into the year, month and day components to create new derived columns, which in turn I'll use as the partition keys to my table Example of d...