Solved

while using git , i want to neglect some files at git to track which prevents me making fast pulls, and forces me to stash, how do i avoid this?

Posted on 2015-01-09
3
180 Views
Last Modified: 2015-02-01
Hi,

i am new to version control system git, and source tree... i want to ask 2 issues,

in git bash, command prompt , any time i try to make a pull it asks for username and password , how do i disable this and avoid asking each time for passwords ?

second question is whenever i make changes to my code and pull changes ,it gets an error sayying that there are changes should be removed or stashed etc.. so these are either configuration files or dll files which i dont want to commit and change the contents but it forces me to stash them before i can make a pull. how do i avoid this?

thank you
0
Comment
Question by:nicedone
  • 2
3 Comments
 
LVL 29

Expert Comment

by:fibo
ID: 40540676
Question 1: is the remote you are pulling from registered in the git profile? check with "git config -l"

Not sure if you are using Git from windows or linux.
From windows, you probably have "git gui" in addition to "git bash" (try typing "git gui" from bash)


Question 2: you need to establish some "clean" reference situation so that all dlls, config, etc are either synced or ignored
use the file .gitignore at the root of your project to define which files or directories should be ignored by the tracking system

(To easily ignore files, I personally use TortoiseGit in addition to git bash/ git gui. Be careful though: Do NOT use Tortoise to push, it badly handles conflicts)
0
 

Author Comment

by:nicedone
ID: 40540719
Hi,

For question  1:   Yes it is registered in the git profile when i hit git config -l ,my profile as well as all the repository information has appeared,

i also typed git gui ,i guess this is an interface for git bash ? but i found soucetree way more easy and more functions available on the interface somehow?

For second question : I make a change to a config file, but i dont want to commit this change ,i dont want to push my config change to other developers but on the side i want to run this file on my own desired settings only so in that case ,ignore would work but then it will affect every one , so the file will be ignored in all system which i would not desire?

how can i resolve this ? thanks again
0
 
LVL 29

Accepted Solution

by:
fibo earned 500 total points
ID: 40543913
question 1: how are you syncing the repositories? thru http: ?
could you place here an edited copy of the output of config -l
(just list the infos for the repository, mail addresse etc, but obfuscate most info)

question 2: before making a pull or a push, you can hide your changes by using "stash"

Another solution would be to "branch" your changes, but this has side effects as well

My 2c on tools:
- I don't know sourcetree, so no comment
- tortoisegit: great to ignore files, and to diff files, with only a right-click. VERY BAD FOR PUSHING since it badly handles conflicts. Do not use Tortoise for pushing changes! Very great to handle any conflicted file (as opposed to a conflicted commit)
- git-gui: great to commit / push files... after their status has been solved with git bash. handling pulls not very evident. The best tool to easily see changes in files
- git bash: great to pull, and to index directories in coherent ways (then commit them with git-gui)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Entity Framework 3 47
Please explain "Multi-Tenant Services" 5 65
Entity Framework 7 32
C# MVC and a global static factory that never dies 4 49
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now